help bug and comment char.

Поиск
Список
Период
Сортировка
От Terry Mackintosh
Тема help bug and comment char.
Дата
Msg-id Pine.LNX.3.95.990125150434.11058D-100000@terry1.acun.com
обсуждение исходный текст
Ответы Re: [HACKERS] help bug and comment char.
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] FW: [CORE] create database bug
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] handling 64bit time_t's