Re: Problem with domains

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Problem with domains
Дата
Msg-id 20030924220903.B70696@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: Problem with domains  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Список pgsql-bugs
On Wed, 24 Sep 2003, Robert Creager wrote:

> Once upon a time (Wed, 24 Sep 2003 21:10:53 -0700 (PDT))
> Stephan Szabo <sszabo@megazone.bigpanda.com> uttered something amazingly similar
> to:
>
> >
> > 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.
>
> 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?

All errors are considered unrecoverable ones by PostgreSQL so after any
error the transaction is in an effectively unusable state and should be
rolled back.

> > > > > > 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
> > > > > >

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robert Creager
Дата:
Сообщение: Re: Problem with domains
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem with domains