help bug and comment char.
Terry Mackintosh <terry@terrym.com>
From: Terry Mackintosh <terry@terrym.com>
To: PostgreSQL-development <hackers@postgreSQL.org>
Date: 1999-01-25T20:19:06Z
Lists: pgsql-hackers
Hi all
In looking for how to do table constraints psql help says:
software=> \h create table
Command: create table
Description: create a new table
Syntax:
CREATE TABLE class_name
(attr1 type1 [DEFAULT expression] [NOT NULL], ...attrN)
[INHERITS (class_name1, ...class_nameN)
[[CONSTRAINT name] CHECK condition1, ...conditionN] ]
;
But this both does not work, and does not agree with "The Practical SQL
Handbook", the examples of which do work.
Should the syntax not be more like: (constraint inside the main parens)
Command: create table
Description: create a new table
Syntax:
CREATE TABLE class_name
(attr1 type1 [DEFAULT expression] [NOT NULL][, ...attrN]
[,[CONSTRAINT name] CHECK condition1, ...conditionN] ]);
I'm not sure where to put:
[INHERITS (class_name1, ...class_nameN)
as I've never used it. But I suspect it may need inside the '()' as well,
no?
OH, also, what is / is there, a comment character to use in SQL scripts
feed into psql?
Have a great day
Terry Mackintosh <terry@terrym.com> http://www.terrym.com
sysadmin/owner I'm excited about life! How about YOU!?
Proudly powered by R H Linux 4.2, Apache 1.3.x, PHP 3.x, PostgreSQL 6.x
-----------------------------------------------------------------------
Only if you know where you're going can you get there.