Lists: | pgsql-hackerspgsql-patches |
---|
From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: domain check constraint syntax problem for 7.4 |
Date: | 2003-01-26 05:01:04 |
Message-ID: | 1043557263.58142.139.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
They work the same as table constraints with in-line declaration (no
comma).
On Sun, 2003-01-26 at 00:09, Bruno Wolff III wrote:
> I am trying to create a domain with more than one check constraint and
> I am getting an error that I don't think is correct according to the
> documentation. I am not sure if this is a limitation of a partially
> implemented feature or a bug that has so far been overlooked.
>
> For example:
> area=# create domain test6 as int constraint ack check(value<4);
> CREATE DOMAIN
> area=# create domain test7 as int constraint ack check(value<4),
> area-# constraint ack1 check(value>0);
> ERROR: parser: syntax error at or near "," at character 57
> area=# create domain test7 as int check(value<4), check(value>0);
> ERROR: parser: syntax error at or near "," at character 42
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Rod Taylor <rbt(at)rbt(dot)ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | domain check constraint syntax problem for 7.4 |
Date: | 2003-01-26 05:09:21 |
Message-ID: | 20030126050921.GA12231@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
I am trying to create a domain with more than one check constraint and
I am getting an error that I don't think is correct according to the
documentation. I am not sure if this is a limitation of a partially
implemented feature or a bug that has so far been overlooked.
For example:
area=# create domain test6 as int constraint ack check(value<4);
CREATE DOMAIN
area=# create domain test7 as int constraint ack check(value<4),
area-# constraint ack1 check(value>0);
ERROR: parser: syntax error at or near "," at character 57
area=# create domain test7 as int check(value<4), check(value>0);
ERROR: parser: syntax error at or near "," at character 42
From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: domain check constraint syntax problem for 7.4 |
Date: | 2003-01-26 05:17:30 |
Message-ID: | 20030126051730.GA12291@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
On Sun, Jan 26, 2003 at 00:01:04 -0500,
Rod Taylor <rbt(at)rbt(dot)ca> wrote:
> They work the same as table constraints with in-line declaration (no
> comma).
OK. But the documentation implies there is a comma, so it should probably
get chenged then.
This is from the create domain documentation:
CREATE DOMAIN domainname [AS] data_type
[ DEFAULT default_expr ]
[ constraint [, ... ] ]
I would have expected the last line to be:
[ constraint [ ... ] ]
if there weren't supposed to be commas.
Thanks for the help.
From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: domain check constraint syntax problem for 7.4 |
Date: | 2003-01-26 13:21:52 |
Message-ID: | 1043587312.58142.143.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
On Sun, 2003-01-26 at 00:17, Bruno Wolff III wrote:
> On Sun, Jan 26, 2003 at 00:01:04 -0500,
> Rod Taylor <rbt(at)rbt(dot)ca> wrote:
> > They work the same as table constraints with in-line declaration (no
> > comma).
>
> OK. But the documentation implies there is a comma, so it should probably
> get chenged then.
Yes, it should. (attached)
--
Rod Taylor <rbt(at)rbt(dot)ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
Attachment | Content-Type | Size |
---|---|---|
domain_doc.patch | text/x-patch | 1.1 KB |
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | Bruno Wolff III <bruno(at)wolff(dot)to>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: domain check constraint syntax problem for 7.4 |
Date: | 2003-02-03 15:58:32 |
Message-ID: | 200302031558.h13FwWH23952@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Your patch has been added to the PostgreSQL unapplied patches list at:
http://momjian.postgresql.org/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Rod Taylor wrote:
-- Start of PGP signed section.
> On Sun, 2003-01-26 at 00:17, Bruno Wolff III wrote:
> > On Sun, Jan 26, 2003 at 00:01:04 -0500,
> > Rod Taylor <rbt(at)rbt(dot)ca> wrote:
> > > They work the same as table constraints with in-line declaration (no
> > > comma).
> >
> > OK. But the documentation implies there is a comma, so it should probably
> > get chenged then.
>
> Yes, it should. (attached)
> --
> Rod Taylor <rbt(at)rbt(dot)ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc
[ Attachment, skipping... ]
-- End of PGP section, PGP failed!
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | Bruno Wolff III <bruno(at)wolff(dot)to>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: domain check constraint syntax problem for 7.4 |
Date: | 2003-02-13 05:32:58 |
Message-ID: | 200302130532.h1D5Ww804201@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Patch applied to HEAD and 7.3.X. Thanks.
---------------------------------------------------------------------------
Rod Taylor wrote:
-- Start of PGP signed section.
> On Sun, 2003-01-26 at 00:17, Bruno Wolff III wrote:
> > On Sun, Jan 26, 2003 at 00:01:04 -0500,
> > Rod Taylor <rbt(at)rbt(dot)ca> wrote:
> > > They work the same as table constraints with in-line declaration (no
> > > comma).
> >
> > OK. But the documentation implies there is a comma, so it should probably
> > get chenged then.
>
> Yes, it should. (attached)
> --
> Rod Taylor <rbt(at)rbt(dot)ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc
[ Attachment, skipping... ]
-- End of PGP section, PGP failed!
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073