Re: sequences what does ::text mean ?
От
Oliver Elphick
Тема
Re: sequences what does ::text mean ?
Дата
Msg-id
1025693889.14876.5.camel@linda
Ответ на
Re: sequences what does ::text mean ? (Ewald Geschwinde)
Список
Дерево обсуждения
Re: sequences what does ::text mean ? Ewald Geschwinde <webmaster@geschwinde.net>
Re: sequences what does ::text mean ? Oliver Elphick <olly@lfix.co.uk>
Re: sequences what does ::text mean ? Andrew McMillan <andrew@catalyst.net.nz>
Re: sequences what does ::text mean ? Josh Jore <josh@lavendergreens.org>
Re: sequences what does ::text mean ? Tom Lane <tgl@sss.pgh.pa.us>
Re: sequences what does ::text mean ? Josh Jore <josh@lavendergreens.org>
On Wed, 2002-07-03 at 11:05, Ewald Geschwinde wrote:
> Henk Schets wrote:
> >In a table I have as a default value nextval('seq_auteurs'). What's
the difference with nextval('seq_auteurs'::text) ?
> The difference ist nextval('seq_autheurs') you get an integer back and
> with the second one it casts the integer to text and returns a text value
That would be "nextval('seq_auteurs')::text", with the cast outside the
parentheses.
"nextval('seq_auteurs'::text)" converts 'seq_auteurs' to text before
using it to identify the sequence for nextval(). Since 'seq_auteurs' is
already text, this is a null operation.
Oliver
В списке pgsql-novice по дате отправления