public inbox for [email protected]
help / color / mirror / Atom feedThe example for creating a check constraint is missing a comma
3+ messages / 3 participants
[nested] [flat]
* The example for creating a check constraint is missing a comma
@ 2018-02-15 17:43 PG Doc comments form <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: PG Doc comments form @ 2018-02-15 17:43 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/10/static/sql-createtable.html
Description:
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 <> '')
);
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: The example for creating a check constraint is missing a comma
@ 2018-02-15 18:47 Tom Lane <[email protected]>
parent: PG Doc comments form <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2018-02-15 18:47 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
=?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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: The example for creating a check constraint is missing a comma
@ 2018-02-15 18:55 Neil Anderson <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Neil Anderson @ 2018-02-15 18:55 UTC (permalink / raw)
To: pgsql-docs
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-02-15 18:55 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 17:43 The example for creating a check constraint is missing a comma PG Doc comments form <[email protected]>
2018-02-15 18:47 ` Tom Lane <[email protected]>
2018-02-15 18:55 ` Neil Anderson <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox