![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Robert Creager wrote: Sorry to send this to you directly, but I seem to be having a problem posting to bugs, and I received no response from either Mark F. nor majordomo-owner. I've sent the following mail twice to postgresql-bugs (AT) postgresql (DOT) org, and both times, it's neither showed up nor have I received any mail indicating it's been held for moderation, and I am subscribed to the list. Thoughts? Rob The problem: Using 7.4b2 from tar file, not cvs. PostgreSQL 7.4beta2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) While figuring out how to use DOMAIN's, I ran across this: begin; create domain test as integer constraint check( value > 0 ); -- ERROR: syntax error at or near "check" at character 42 create domain test as integer check( value > 0 ); -- ERROR: current transaction is aborted, queries ignored until end of transaction block Forgot to name the constraint in the first form. The second form works fine on it's own. Cheers, Rob -- 17:37:47 up 44 days, 10:13, 4 users, load average: 2.13, 2.04, 2.04 -- End of PGP section, PGP failed! -- Bruce Momjian | http://candle.pha.pa.us pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 -- 21:08:35 up 54 days, 13:40, 4 users, load average: 2.07, 2.03, 1.96 -- End of PGP section, PGP failed! |
#2
| |||
| |||
|
|
Sent for user who is having trouble posting to bugs list: |
|
Using 7.4b2 from tar file, not cvs. PostgreSQL 7.4beta2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) While figuring out how to use DOMAIN's, I ran across this: begin; create domain test as integer constraint check( value > 0 ); -- ERROR: syntax error at or near "check" at character 42 create domain test as integer check( value > 0 ); -- ERROR: current transaction is aborted, queries ignored until end of transaction block Forgot to name the constraint in the first form. The second form works fine on it's own. |
#3
| |||
| |||
|
|
On Wed, 24 Sep 2003, Bruce Momjian wrote: Sent for user who is having trouble posting to bugs list: Seems like the correct behavior to me. When CONSTRAINT is given, the name is not optional AFAICS. |
|
begin; create domain test as integer constraint check( value > 0 ); -- ERROR: syntax error at or near "check" at character 42 create domain test as integer check( value > 0 ); -- ERROR: current transaction is aborted, queries ignored until end of transaction block |
#4
| |||
| |||
|
|
Seems like the correct behavior to me. When CONSTRAINT is given, the name is not optional AFAICS. True, but the second CREATE DOMAIN, which is a valid form, fails when preceded by the invalid form. This was the error I was referring to. Not the fact that I didn't know how to use domains ;-) If the transaction is bad after the first invalid CREATE DOMAIN, the error should say so, rather than waiting for a second valid statement to come along, shouldn't it? |
|
begin; create domain test as integer constraint check( value > 0 ); -- ERROR: syntax error at or near "check" at character 42 create domain test as integer check( value > 0 ); -- ERROR: current transaction is aborted, queries ignored until end of transaction block |
#5
| |||
| |||
|
|
Robert Creager <Robert_Creager (AT) LogicalChaos (DOT) org> writes: Seems like the correct behavior to me. When CONSTRAINT is given, the name is not optional AFAICS. True, but the second CREATE DOMAIN, which is a valid form, fails when preceded by the invalid form. This was the error I was referring to. Not the fact that I didn't know how to use domains ;-) If the transaction is bad after the first invalid CREATE DOMAIN, the error should say so, rather than waiting for a second valid statement to come along, shouldn't it? Uh, which part of "queries ignored until end of transaction block" didn't you understand? |
|
begin; create domain test as integer constraint check( value > 0 ); -- ERROR: syntax error at or near "check" at character 42 create domain test as integer check( value > 0 ); -- ERROR: current transaction is aborted, queries ignored until end of transaction block |
![]() |
| Thread Tools | |
| Display Modes | |
| |