help bug and comment char.

From: Terry Mackintosh <terry(at)terrym(dot)com>
To: PostgreSQL-development <hackers(at)postgreSQL(dot)org>
Subject: help bug and comment char.
Date: 1999-01-25 20:19:06
Message-ID: Pine.LNX.3.95.990125150434.11058D-100000@terry1.acun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)terrym(dot)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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-01-25 23:44:30 Re: [HACKERS] FW: [CORE] create database bug
Previous Message Adrian Gartland 1999-01-25 19:48:23 handling 64bit time_t's