Re: Problem with domains

From: Robert Creager <Robert_Creager(at)LogicalChaos(dot)org>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Bugs for PostgreSQL <pgsql-bugs(at)postgreSQL(dot)org>
Subject: Re: Problem with domains
Date: 2003-09-25 04:54:26
Message-ID: 20030924225426.62328bc8.Robert_Creager@LogicalChaos.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Once upon a time (Wed, 24 Sep 2003 21:10:53 -0700 (PDT))
Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)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?

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

Cheers,
Rob
--
22:50:13 up 54 days, 15:22, 5 users, load average: 2.36, 2.37, 2.17

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2003-09-25 05:14:11 Re: Problem with domains
Previous Message Stephan Szabo 2003-09-25 04:10:53 Re: Problem with domains