diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2002-07-18 23:11:32 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2002-07-18 23:11:32 +0000 |
| commit | 97377048b460823a300b1d414203c5f09c8efc1b (patch) | |
| tree | 7c567e9728b214a10604afa1aa923d02a683156e /src/bin/pg_dump/common.c | |
| parent | a345ac8842089cbca1678d5b28773a827937693f (diff) | |
| download | postgresql-97377048b460823a300b1d414203c5f09c8efc1b.tar.gz | |
pg_cast table, and standards-compliant CREATE/DROP CAST commands, plus
extension to create binary compatible casts. Includes dependency tracking
as well.
pg_proc.proimplicit is now defunct, but will be removed in a separate
commit.
pg_dump provides a migration path from the previous scheme to declare
casts. Dumping binary compatible casts is currently impossible, though.
Diffstat (limited to 'src/bin/pg_dump/common.c')
| -rw-r--r-- | src/bin/pg_dump/common.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index 827459b4db..123ef3df05 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.65 2002/06/20 20:29:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.66 2002/07/18 23:11:29 petere Exp $ * *------------------------------------------------------------------------- */ @@ -170,6 +170,13 @@ dumpSchema(Archive *fout, dumpOprs(fout, oprinfo, numOperators); } + if (!dataOnly) + { + if (g_verbose) + write_msg(NULL, "dumping out user-defined casts\n"); + dumpCasts(fout, finfo, numFuncs, tinfo, numTypes); + } + *numTablesPtr = numTables; return tblinfo; } @@ -387,6 +394,23 @@ findFuncByOid(FuncInfo *finfo, int numFuncs, const char *oid) } /* + * Finds the index (in tinfo) of the type with the given OID. Returns + * -1 if not found. + */ +int +findTypeByOid(TypeInfo *tinfo, int numTypes, const char *oid) +{ + int i; + + for (i = 0; i < numTypes; i++) + { + if (strcmp(tinfo[i].oid, oid) == 0) + return i; + } + return -1; +} + +/* * findOprByOid * given the oid of an operator, return the name of the operator * |
