|
22 | 22 | * |
23 | 23 | * |
24 | 24 | * IDENTIFICATION |
25 | | - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.209 2001/05/22 16:37:16 petere Exp $ |
| 25 | + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.210 2001/05/30 14:15:27 momjian Exp $ |
26 | 26 | * |
27 | 27 | * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb |
28 | 28 | * |
|
119 | 119 | * |
120 | 120 | * - Dump dependency information in dumpType. This is necessary |
121 | 121 | *because placeholder types will have an OID less than the |
122 | | - *OID of the type functions, but type must be created after |
| 122 | + *OID of the type functions, but type must be created after |
123 | 123 | *the functions. |
124 | 124 | * |
125 | 125 | * Modifications - 4-Apr-2001 - pjw@rhyme.com.au |
@@ -773,10 +773,10 @@ main(int argc, char **argv) |
773 | 773 |
|
774 | 774 | dataOnly=schemaOnly=dumpData=attrNames= false; |
775 | 775 |
|
776 | | -if (!strrchr(argv[0],SEP_CHAR)) |
| 776 | +if (!strrchr(argv[0],'/')) |
777 | 777 | progname=argv[0]; |
778 | 778 | else |
779 | | -progname=strrchr(argv[0],SEP_CHAR)+1; |
| 779 | +progname=strrchr(argv[0],'/')+1; |
780 | 780 |
|
781 | 781 | /* Set defaulty options based on progname */ |
782 | 782 | if (strcmp(progname,"pg_backup")==0) |
@@ -2078,7 +2078,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs) |
2078 | 2078 | "order by oid", |
2079 | 2079 | RELKIND_RELATION,RELKIND_SEQUENCE,RELKIND_VIEW); |
2080 | 2080 | }else { |
2081 | | -/* |
| 2081 | +/* |
2082 | 2082 | * Before 7.1, view relkind was not set to 'v', so we must check |
2083 | 2083 | * if we have a view by looking for a rule in pg_rewrite. |
2084 | 2084 | */ |
@@ -2195,13 +2195,13 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs) |
2195 | 2195 | else |
2196 | 2196 | tblinfo[i].viewdef=NULL; |
2197 | 2197 |
|
2198 | | -/* |
| 2198 | +/* |
2199 | 2199 | * Get non-inherited CHECK constraints, if any. |
2200 | 2200 | * |
2201 | 2201 | * Exclude inherited CHECKs from CHECK constraints total. If a |
2202 | 2202 | * constraint matches by name and condition with a constraint |
2203 | 2203 | * belonging to a parent class (OR conditions match and both |
2204 | | - * names start with '$', we assume it was inherited. |
| 2204 | + * names start with '$', we assume it was inherited. |
2205 | 2205 | */ |
2206 | 2206 | if (tblinfo[i].ncheck>0) |
2207 | 2207 | { |
@@ -2313,7 +2313,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs) |
2313 | 2313 | intn; |
2314 | 2314 |
|
2315 | 2315 | resetPQExpBuffer(query); |
2316 | | -if (g_fout->remoteVersion<70100) |
| 2316 | +if (g_fout->remoteVersion<70100) |
2317 | 2317 | { |
2318 | 2318 | /* Fake the LOJ from below */ |
2319 | 2319 | appendPQExpBuffer(query, |
@@ -2404,7 +2404,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs) |
2404 | 2404 | g_comment_end); |
2405 | 2405 |
|
2406 | 2406 | resetPQExpBuffer(query); |
2407 | | -appendPQExpBuffer(query, |
| 2407 | +appendPQExpBuffer(query, |
2408 | 2408 | "SELECT tgname, tgfoid, tgtype, tgnargs, tgargs, " |
2409 | 2409 | "tgisconstraint, tgconstrname, tgdeferrable, " |
2410 | 2410 | "tgconstrrelid, tginitdeferred, oid, " |
@@ -2575,14 +2575,14 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs) |
2575 | 2575 | if (strcmp(tgconstrrelid,"0")!=0) { |
2576 | 2576 |
|
2577 | 2577 | if (PQgetisnull(res2,i2,i_tgconstrrelname)) |
2578 | | -{ |
2579 | | -fprintf(stderr,"getTables(): SELECT produced NULL referenced table name " |
| 2578 | +{ |
| 2579 | +fprintf(stderr,"getTables(): SELECT produced NULL referenced table name " |
2580 | 2580 | "for trigger '%s' on relation '%s' (oid was %s).\n", |
2581 | 2581 | tgname,tblinfo[i].relname,tgconstrrelid); |
2582 | | -exit_nicely(g_conn); |
2583 | | -} |
| 2582 | +exit_nicely(g_conn); |
| 2583 | +} |
2584 | 2584 |
|
2585 | | -appendPQExpBuffer(query," FROM %s", |
| 2585 | +appendPQExpBuffer(query," FROM %s", |
2586 | 2586 | fmtId(PQgetvalue(res2,i2,i_tgconstrrelname),force_quotes)); |
2587 | 2587 | } |
2588 | 2588 | if (!tgdeferrable) |
@@ -2770,7 +2770,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables) |
2770 | 2770 | if (g_fout->remoteVersion<70100) |
2771 | 2771 | { |
2772 | 2772 | /* Fake the LOJ below */ |
2773 | | -appendPQExpBuffer(q, |
| 2773 | +appendPQExpBuffer(q, |
2774 | 2774 | " SELECT a.oid as attoid, a.attnum, a.attname, t.typname, a.atttypmod, " |
2775 | 2775 | " a.attnotnull, a.atthasdef, NULL as atttypedefn " |
2776 | 2776 | " from pg_attribute a, pg_type t " |
@@ -4649,7 +4649,7 @@ findLastBuiltinOid_V71(const char *dbname) |
4649 | 4649 | * this is probably not foolproof but comes close |
4650 | 4650 | */ |
4651 | 4651 |
|
4652 | | -staticOid |
| 4652 | +staticOid |
4653 | 4653 | findLastBuiltinOid_V70(void) |
4654 | 4654 | { |
4655 | 4655 | PGresult*res; |
|