1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Patch to put rudimentary dependency support into pg_dump. This addresses

the UDT/function order problem.

    - Rudimentary support for dependencies in archives.
      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).
This commit is contained in:
Philip Warner
2001-04-01 05:42:51 +00:00
parent 55f0f5d97a
commit 135040d511
7 changed files with 232 additions and 58 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.9 2001/03/22 04:00:11 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.10 2001/04/01 05:42:50 pjw Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
@ -47,6 +47,10 @@
#include "libpq-fe.h"
#define atooid(x) ((Oid) strtoul((x), NULL, 10))
#define oidcmp(x,y) ( ((x) < (y) ? -1 : ((x) > (y)) ? 1 : 0) )
#define oideq(x,y) ( (x) == (y) )
typedef enum _archiveFormat
{
archUnknown = 0,
@ -131,7 +135,7 @@ PGconn *ConnectDatabase(Archive *AH,
/* Called to add a TOC entry */
extern void ArchiveEntry(Archive *AH, const char *oid, const char *name,
const char *desc, const char *(deps[]), const char *defn,
const char *desc, const char *((*deps)[]), const char *defn,
const char *dropStmt, const char *copyStmt, const char *owner,
DataDumperPtr dumpFn, void *dumpArg);
@ -142,8 +146,8 @@ extern int WriteData(Archive *AH, const void *data, int dLen);
extern int StartBlobs(Archive* AH);
extern int EndBlobs(Archive* AH);
*/
extern int StartBlob(Archive *AH, int oid);
extern int EndBlob(Archive *AH, int oid);
extern int StartBlob(Archive *AH, Oid oid);
extern int EndBlob(Archive *AH, Oid oid);
extern void CloseArchive(Archive *AH);