Skip to content

Conversation

@glyh
Copy link
Member

@glyh glyh commented Oct 27, 2025

As title. so we're not polluting pgsql db.

@glyh glyh requested a review from a team as a code owner October 27, 2025 07:26
@glyh
Copy link
Member Author

glyh commented Oct 27, 2025

!ci-build-me

@glyh
Copy link
Member Author

glyh commented Oct 27, 2025

!ci-build-me

Copy link
Member

@dkijania dkijania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for using pg_temp.. Why we replaced order of dealing with tables? Is it intentional?

@glyh
Copy link
Member Author

glyh commented Nov 3, 2025

Yes, I want the order of 2 scripts completely reversed. I guess there's no big point on it. Which way do you think it's more maintainable?

@dkijania
Copy link
Member

dkijania commented Nov 3, 2025

Can you help me understand why we want to reverse it ?

@glyh
Copy link
Member Author

glyh commented Nov 3, 2025

It doesn't have to. I can revert it if you like.

The reason I have put it in this shape is because I have the mental model of DB rollbacks.

BEGIN;

UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;

ROLLBACK;

Something like this.

@dkijania
Copy link
Member

dkijania commented Nov 3, 2025

ok, understand now. Please add changelog as well. Starting from this pr we will be using pg_temp, maybe it is useful information for some archive operators

@glyh
Copy link
Member Author

glyh commented Nov 4, 2025

!ci-build-me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants