Обсуждение: pg_dump UDT/function dependency patch
Patch to put rudimentary dependency support into pg_dump. This addresses
the UDT/function order problem. Unfortunately, this is not a small patch so
I would prefer some debate about whether it should be applied 7.1.
* - Rudimentary support for dependencies in archives. Current
implementation
* uses dependencies to modify the OID used in sorting TOC
entries.
* This will NOT handle multi-level dependencies, but will
manage simple
* relationships like UDTs & their functions.
*
* - Treat OIDs with more respect (avoid using ints, use macros for
* conversion & comparison).
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
Вложения
Philip Warner <pjw@rhyme.com.au> writes:
> Patch to put rudimentary dependency support into pg_dump. This addresses
> the UDT/function order problem. Unfortunately, this is not a small patch so
> I would prefer some debate about whether it should be applied 7.1.
Looks good to me. A large part of the bulk appears to be changes to
not treat OIDs as integers, which is a necessary bug fix anyway.
One small stylistic quibble:
+#define oidcmp(x,y) ( (x < y ? -1 : (x > y) ? 1 : 0))
+#define oideq(x,y) (x == y)
These need more parentheses to be safe:
+#define oidcmp(x,y) ( ((x) < (y) ? -1 : ((x) > (y)) ? 1 : 0))
+#define oideq(x,y) ((x) == (y))
regards, tom lane
At 20:22 31/03/01 -0500, Tom Lane wrote:
>
>One small stylistic quibble:
>
Applied & always welcome. Also sent to CVS...
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/