Re: sequence in schema -- broken default - Mailing list pgsql-general

From Martín Marqués
Subject Re: sequence in schema -- broken default
Date
Msg-id 1074890014.4011851e21da2@bugs.unl.edu.ar
Whole thread Raw
In response to Re: sequence in schema -- broken default  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
Mensaje citado por "Joshua D. Drake" <jd@commandprompt.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
-------------------------------------------------------

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: If table A value IS NULL then table B
Next
From: Martín Marqués
Date:
Subject: Re: sequence in schema -- broken default