Re: Table definitions using CHECK and DEFAULT - Mailing list pgsql-general

From Tom Lane
Subject Re: Table definitions using CHECK and DEFAULT
Date
Msg-id 10475.1004922251@sss.pgh.pa.us
Whole thread Raw
In response to Table definitions using CHECK and DEFAULT  ("Matthew L. Wirges" <wirges@cerias.purdue.edu>)
List pgsql-general
"Matthew L. Wirges" <wirges@cerias.purdue.edu> writes:
> address_type VARCHAR(30) DEFAULT 'unknown' NOT NULL CHECK(address_type
> IN ("unknown", "forged", "proxy", "temporary", "permanent"))
> gives the error:
> psql:IRDB_POSTGRES:69: ERROR:  Attribute 'unknown' not found

You must use single quotes not double quotes for literal strings.
Double-quotes are for names that don't follow standard identifier
rules.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Got error on CREATE TABLE AS (+Bug?)
Next
From: "Aasmund Midttun Godal"
Date:
Subject: Re: newbie question