From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Refactoring pg_dump's getTables() |
Date: | 2021-10-16 21:17:35 |
Message-ID: | 1240992.1634419055@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Attached is a proposed patch that refactors getTables() along the
same lines as some previous work (eg 047329624, ed2c7f65b, daa9fe8a5)
to avoid having multiple partially-redundant copies of the SQL query.
This gets rid of nearly 300 lines of duplicative spaghetti code,
creates a uniform style for dealing with cross-version changes
(replacing at least three different methods currently being used
for that in this same stretch of code), and allows moving some
comments to be closer to the code they describe.
There's a lot I still want to change here, but this part seems like it
should be fairly uncontroversial. I've tested it against servers back
to 8.0 (which is what led me to trip over the bug fixed in 40dfac4fc).
Any objections to just pushing it?
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
refactor-getTables.patch | text/x-diff | 31.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-10-17 00:33:48 | Re: Reset snapshot export state on the transaction abort |
Previous Message | Pavel Stehule | 2021-10-16 17:39:31 | access to record's field in dynamic SQL doesn't work |