Re: nextval::text - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: nextval::text
Date
Msg-id 20030305085711.GA14268@svana.org
Whole thread Raw
In response to nextval::text  (John Smith <john_smith_45678@yahoo.com>)
List pgsql-general
On Tue, Mar 04, 2003 at 10:54:34PM -0800, John Smith wrote:
>
> I was just wondering why in the generated schema nextval is cast to text rather than int?

I think you're misreading. It's the string being passed to nextval that is
being cast to text, not the return value.

> John
>
> CREATE TABLE x (
>     id integer DEFAULT nextval('"x_id_seq"'::text) NOT NULL,
>     name character varying(30) NOT NULL
> );
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, and more
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.

Attachment

pgsql-general by date:

Previous
From: Carlos Moreno
Date:
Subject: Re:
Next
From: Jean-Christian Imbeault
Date:
Subject: Re: Demande d'information