Re: integer column to serial "type"

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Linos <info(at)linos(dot)es>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: integer column to serial "type"
Date: 2012-10-25 17:45:20
Message-ID: 50897AB0.5010405@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 25/10/2012 16:32, Linos wrote:
> Hello,
> there is some way to get and old integer primary key column to show the "type"
> serial at table description?
>
> I had a table like this:
>
> CREATE TABLE test
> (
> test_id integer NOT NULL,
> CONSTRAINT test_pkey PRIMARY KEY (test_id),
> );
>
>
> that i would like to see as:
>
> CREATE TABLE test
> (
> test_id serial NOT NULL,
> CONSTRAINT test_pkey PRIMARY KEY (test_id),
> );

PgAdmin manages it somehow, because it's able to show columns as
"serial"... maybe it infers it from the ownership dependency between the
sequence and the column.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Linos 2012-10-25 18:05:06 Re: integer column to serial "type"
Previous Message Linos 2012-10-25 15:48:03 Re: integer column to serial "type"