CHECK constraint names

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема CHECK constraint names
Дата
Msg-id NEBBIOAJBMEENKACLNPCIELHCCAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: CHECK constraint names  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-hackers
Hi,

Is it correct behaviour that unnamed table-level check constraints get the
names '$1', '$2', '$3', etc. in Postgres 7.0.3???

Eg, using table constraints:
----------------------------

test=# create table test (temp char(1) NOT NULL, CHECK (temp IN ('M',
'F')));
CREATE
test=# select rcname from pg_relcheck;
rcname
$1
(1 row)

And, even worse - I think this has got to be a bug:
---------------------------------------------------

test=# create table test (temp char(1) NOT NULL, CHECK (temp IN ('M',
'F')));
CREATE
test=# create table test2 (temp char(1) NOT NULL, CHECK (temp IN ('M',
'F')));
CREATE
test=# select rcname from pg_relcheck;rcname
--------$1$1
(2 rows)

Two constraints with the same name!!!!

And if you use column constraints:
----------------------------------

test=# create table test (temp char(1) NOT NULL CHECK (temp IN ('M', 'F')));
CREATE
test=# select rcname from pg_relcheck; rcname
-----------test_temp
(1 row)

--
Christopher Kings-Lynne
Family Health Network (ACN 089 639 243)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ryan Kirkpatrick
Дата:
Сообщение: PostgreSQL pre-7.1 Linux/Alpha Status...
Следующее
От: bpalmer
Дата:
Сообщение: 7.1 snapshot on i386 BSD MAJOR failure