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