public inbox for [email protected]
help / color / mirror / Atom feedFrom: Neil Anderson <[email protected]>
To: [email protected]
Subject: Re: The example for creating a check constraint is missing a comma
Date: Thu, 15 Feb 2018 13:55:08 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On 2018-02-15 1:47 PM, Tom Lane wrote:
> =?utf-8?q?PG_Doc_comments_form?= <[email protected]> writes:
>> See the example from the documentation for CREATE TABLE below. There should
>> be a comma before the CONSTRAINT keyword.
>
>> CREATE TABLE distributors (
>> did integer,
>> name varchar(40)
>> CONSTRAINT con1 CHECK (did > 100 AND name <> '')
>> );
>
> Hmm ... that example is legal syntax as-is, but considering that the
> explanation for it says specifically that it's table-constraint syntax
> not column-constraint syntax, I think you're right.
>
> regards, tom lane
>
>
Oh yeah! You're right, strictly speaking it does work. I guess I read it
as a table constraint because it's on the next line.
--
Neil Anderson
[email protected]
http://www.postgrescompare.com
Attachments:
[text/x-vcard] neil.vcf (165B, 2-neil.vcf)
download | inline:
begin:vcard
fn:Neil Anderson
n:Anderson;Neil
email;internet:[email protected]
x-mozilla-html:FALSE
url:https://www.postgrescompare.com
version:2.1
end:vcard
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: The example for creating a check constraint is missing a comma
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox