diff options
| author | Tom Lane | 2009-05-26 17:36:05 +0000 |
|---|---|---|
| committer | Tom Lane | 2009-05-26 17:36:05 +0000 |
| commit | 48938ab50686b98d2af4536bbf342a5011393815 (patch) | |
| tree | 1d2221d7c2af9c90f321e19b4a8a1e231b91c35e /src/bin | |
| parent | 99bf328237d89e0fd22821a940d4af0506353218 (diff) | |
Allow the second argument of pg_get_expr() to be just zero when deparsing
an expression that's not supposed to contain variables. Per discussion
with Gevik Babakhani, this eliminates the need for an ugly kluge (namely,
specifying some unrelated relation name). Remove one such kluge from
pg_dump.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/pg_dump/pg_dump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 814c8228545..ccb54e5929d 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.536 2009/05/21 01:08:43 petere Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.537 2009/05/26 17:36:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -6186,13 +6186,14 @@ dumpBaseType(Archive *fout, TypeInfo *tinfo) "typanalyze::pg_catalog.oid AS typanalyzeoid, " "typcategory, typispreferred, " "typdelim, typbyval, typalign, typstorage, " - "pg_catalog.pg_get_expr(typdefaultbin, 'pg_catalog.pg_type'::pg_catalog.regclass) AS typdefaultbin, typdefault " + "pg_catalog.pg_get_expr(typdefaultbin, 0) AS typdefaultbin, typdefault " "FROM pg_catalog.pg_type " "WHERE oid = '%u'::pg_catalog.oid", tinfo->dobj.catId.oid); } else if (fout->remoteVersion >= 80300) { + /* Before 8.4, pg_get_expr does not allow 0 for its second arg */ appendPQExpBuffer(query, "SELECT typlen, " "typinput, typoutput, typreceive, typsend, " "typmodin, typmodout, typanalyze, " |
