Re: integer column to serial "type"

From: Linos <info(at)linos(dot)es>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: integer column to serial "type"
Date: 2012-10-25 15:48:03
Message-ID: 50895F33.2000802@linos.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 25/10/12 17:39, Tom Lane wrote:
> Linos <info(at)linos(dot)es> writes:
>> there is some way to get and old integer primary key column to show the "type"
>> serial at table description?
>
> No, because there is no such type. "serial" is just a convenient macro
> that you can use in CREATE TABLE; it's not a real type.
>
> regards, tom lane
>
>

Yeah, i knew it's not a real type and supposed the outcome, i only wanted to be
sure, i find much more pleasant to see:

test_id serial NOT NULL,
than
test_id integer NOT NULL DEFAULT nextval('test_test_id_seq'::regclass),

but i can live with it, thanks!

Regards,
Miguel Angel.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2012-10-25 17:45:20 Re: integer column to serial "type"
Previous Message Tom Lane 2012-10-25 15:39:51 Re: integer column to serial "type"