Re: Problem with domains - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Problem with domains
Date
Msg-id 1908.1064467709@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problem with domains  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Responses Re: Problem with domains  (Robert Creager <Robert_Creager@LogicalChaos.org>)
List pgsql-bugs
Robert Creager <Robert_Creager@LogicalChaos.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

            regards, tom lane

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Problem with domains
Next
From: Robert Creager
Date:
Subject: Re: Problem with domains