pg_dump UDT/function dependency patch

Started by Philip Warnerover 25 years ago3 messagespatches
Jump to latest
#1Philip Warner
pjw@rhyme.com.au

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).

Attachments:

pg_dump_1500_patch.gzapplication/octet-stream; name=pg_dump_1500_patch.gz; x-mac-creator=477A6970; x-mac-type=477A6970Download
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Philip Warner (#1)
Re: pg_dump UDT/function dependency patch

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

#3Philip Warner
pjw@rhyme.com.au
In reply to: Tom Lane (#2)
Re: pg_dump UDT/function dependency patch

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 |/