Bug report CHECK CONSTRAINTS
Bug report CHECK CONSTRAINTS
От:
"Pavel Veretennikov" <vermut@kid.lv>
Дата:
Windows 2000
Russian language
Binary snapshot from Jun 23
When viewing table creation script, it produces following code (example): stakecreditliminusd numeric(11,2) NOT NULL DEFAULT 0.00, CONSTRAINT gs_players_pkey PRIMARY KEY (userid), CONSTRAINT "$1" CHECK sex >= 0, CONSTRAINT "$2" CHECK "type" >= 0
)
WITH OIDS;
When trying to copy-paste-run it, it complains about CHECK contstraints,
cause they should be written like CONSTRAINT "$1" CHECK (sex >= 0), CONSTRAINT "$2" CHECK ("type" >= 0)
according to documentation. PostgreSQL 7.4.3
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Re: Bug report CHECK CONSTRAINTS
От:
Andreas Pflug <pgadmin@pse-consulting.de>
Дата:
Pavel Veretennikov wrote:
>
> CONSTRAINT "$1" CHECK sex >= 0,
> CONSTRAINT "$2" CHECK "type" >= 0
> )
> WITH OIDS;
>
> When trying to copy-paste-run it, it complains about CHECK
> contstraints, cause they should be written like
> CONSTRAINT "$1" CHECK (sex >= 0),
> CONSTRAINT "$2" CHECK ("type" >= 0)
You're right, table reengineering misses the parentheses (the constraint
itself shows it).
Fixed in CVS, thanks for reporting.
Regards,
Andreas