Re: integer column to serial "type"

Поиск
Список
Период
Сортировка
От Linos
Тема Re: integer column to serial "type"
Дата
Msg-id 50897F52.4070506@linos.es
обсуждение исходный текст
Ответ на Re: integer column to serial "type"  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
On 25/10/12 19:45, Raymond O'Donnell wrote:
> 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.
>
>

Yeah i was referring to PgAdmin, didn't notice that columns shown as serial in
PgAdmin are shown like integer nextval(sequence) in \d from psql, i will try to
ask in PgAdmin mailing list how they detect a "serial" column because i have
tried to replicate the exact setup (ownership included) of one and it doesn't works.

Regards,
Miguel Angel.


В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: integer column to serial "type"
Следующее
От: Boris Epstein
Дата:
Сообщение: migrating/spliting Postgres data directory on OpenIndiana