Re: sequence in schema -- broken default

From: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Lee Harr <missive(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: sequence in schema -- broken default
Date: 2004-01-23 20:33:34
Message-ID: 1074890014.4011851e21da2@bugs.unl.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mensaje citado por "Joshua D. Drake" <jd(at)commandprompt(dot)com>:

>
> > # INSERT INTO one.foo VALUES ();
> > ERROR: syntax error at or near ")" at character 29
> >
> > Seems like maybe it should work with the default, but I don't know.
> >
> No, the reason the below works is version() is a function where values
> () is not.
> I don't think you are going to have any choice but to hardcode the
> sequence value

How about:
INSERT INTO one.foo VALUES (DEFAULT)

???

It seemed to work here.

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-------------------------------------------------------
Martín Marqués | Programador, DBA
Centro de Telemática | Administrador
Universidad Nacional
del Litoral
-------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martín Marqués 2004-01-23 20:37:44 Re: sequence in schema -- broken default
Previous Message Alvaro Herrera 2004-01-23 20:28:42 Re: If table A value IS NULL then table B