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 <webmaster@geschwinde.net>)
Список pgsql-novice
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 по дате отправления:

Предыдущее
От: Ewald Geschwinde
Дата:
Сообщение: Re: sequences what does ::text mean ?
Следующее
От: Andrew McMillan
Дата:
Сообщение: Re: sequences what does ::text mean ?