help bug and comment char. - Mailing list pgsql-hackers

From Terry Mackintosh
Subject help bug and comment char.
Date
Msg-id Pine.LNX.3.95.990125150434.11058D-100000@terry1.acun.com
Whole thread Raw
Responses Re: [HACKERS] help bug and comment char.  (Bruce Momjian <maillist@candle.pha.pa.us>)
List 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]
[,[CONSTRAINTname] 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.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] FW: [CORE] create database bug
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] handling 64bit time_t's