aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/command.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-01-29 16:58:54 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-01-29 16:58:54 +0000
commit2b84cbb60f6ff6cb58d42dff026aaf0b2e9ca8ab (patch)
treedcd592dcfdebbc799bd225ac8bf50c0dfe1e61eb /src/backend/commands/command.c
parent7e7416bd4e221fd95701a048eaf2893ab379d9a5 (diff)
downloadpostgresql-2b84cbb60f6ff6cb58d42dff026aaf0b2e9ca8ab.tar.gz
postgresql-2b84cbb60f6ff6cb58d42dff026aaf0b2e9ca8ab.zip
A few minor psql enhancements
Initdb help correction Changed end/abort to commit/rollback and changed related notices Commented out way old printing functions in libpq Fixed a typo in alter table / alter column
Diffstat (limited to 'src/backend/commands/command.c')
-rw-r--r--src/backend/commands/command.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c
index 745eae08322..ef6b66d9c33 100644
--- a/src/backend/commands/command.c
+++ b/src/backend/commands/command.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.66 2000/01/26 05:56:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.67 2000/01/29 16:58:34 petere Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -301,7 +301,6 @@ AlterTableAddColumn(const char *relationName,
Relation idescs[Num_pg_attr_indices];
Relation ridescs[Num_pg_class_indices];
bool hasindex;
-// List *rawDefaults = NIL;
/*
* permissions checking. this would normally be done in utility.c,
@@ -386,9 +385,9 @@ AlterTableAddColumn(const char *relationName,
/*
* XXX is the following check sufficient?
*/
- if (((Form_pg_class) GETSTRUCT(reltup))->relkind == RELKIND_INDEX)
+ if (((Form_pg_class) GETSTRUCT(reltup))->relkind != RELKIND_RELATION)
{
- elog(ERROR, "ALTER TABLE: index relation \"%s\" not changed",
+ elog(ERROR, "ALTER TABLE: relation \"%s\" is not a table",
relationName);
}
@@ -429,7 +428,7 @@ AlterTableAddColumn(const char *relationName,
0, 0);
if (HeapTupleIsValid(tup))
- elog(ERROR, "ALTER TABLE: column name \"%s\" already exists in relation \"%s\"",
+ elog(ERROR, "ALTER TABLE: column name \"%s\" already exists in table \"%s\"",
colDef->colname, relationName);
/*
@@ -627,14 +626,12 @@ AlterTableAlterColumn(const char *relationName,
/* keep the system catalog indices current */
CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, irelations);
CatalogIndexInsert(irelations, Num_pg_attr_indices, attr_rel, newtuple);
- CatalogCloseIndices(Num_pg_attrdef_indices, irelations);
+ CatalogCloseIndices(Num_pg_attr_indices, irelations);
/* get rid of actual default definition */
drop_default(myrelid, attnum);
}
- else
- elog(NOTICE, "ALTER TABLE: there was no default on column \"%s\" of relation \"%s\"",
- colName, relationName);
+
heap_endscan(scan);
heap_close(attr_rel, NoLock);
}