1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Doc fix for INSERT ... (DEFAULT, ...)

Appears I forgot to update the docs earlier.

Rod Taylor
This commit is contained in:
Bruce Momjian
2002-04-24 02:38:58 +00:00
parent 9fcc1159be
commit adf7cc04cb
2 changed files with 24 additions and 4 deletions

View File

@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.251 2002/04/21 05:21:17 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.252 2002/04/24 02:38:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4368,6 +4368,20 @@ dumpTables(Archive *fout, TableInfo *tblinfo, int numTables,
objoid = tblinfo[i].viewoid;
appendPQExpBuffer(delq, "DROP VIEW %s;\n", fmtId(tblinfo[i].relname, force_quotes));
appendPQExpBuffer(q, "CREATE VIEW %s as %s\n", fmtId(tblinfo[i].relname, force_quotes), tblinfo[i].viewdef);
/*
* Views can have default values -- however, they must be
* specified in an ALTER TABLE command after the view has
* been created, not in the view definition itself.
*/
for (j = 0; j < tblinfo[i].numatts; j++)
{
if (tblinfo[i].adef_expr[j] != NULL && tblinfo[i].inhAttrDef[j] == 0)
appendPQExpBuffer(q, "ALTER TABLE %s ALTER COLUMN %s SET DEFAULT %s;\n",
tblinfo[i].relname, tblinfo[i].attnames[j],
tblinfo[i].adef_expr[j]);
}
commentDeps = malloc(sizeof(char *) * 2);
(*commentDeps)[0] = strdup(objoid);
(*commentDeps)[1] = NULL; /* end of list */