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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user