Re: The example for creating a check constraint is missing a comma

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: neil(at)postgrescompare(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: The example for creating a check constraint is missing a comma
Date: 2018-02-15 18:47:39
Message-ID: 27717.1518720459@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

=?utf-8?q?PG_Doc_comments_form?= <noreply(at)postgresql(dot)org> 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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Neil Anderson 2018-02-15 18:55:08 Re: The example for creating a check constraint is missing a comma
Previous Message PG Doc comments form 2018-02-15 17:43:18 The example for creating a check constraint is missing a comma