Re: sequence in schema -- broken default

Поиск
Список
Период
Сортировка
От Martín Marqués
Тема Re: sequence in schema -- broken default
Дата
Msg-id 1074890014.4011851e21da2@bugs.unl.edu.ar
обсуждение исходный текст
Ответ на Re: sequence in schema -- broken default  ("Joshua D. Drake" <jd@commandprompt.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: If table A value IS NULL then table B
Следующее
От: Martín Marqués
Дата:
Сообщение: Re: sequence in schema -- broken default