Re: removing "serial" from table definitions.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: removing "serial" from table definitions.
Date: 2021-06-24 14:19:17
Message-ID: 2620781.1624544357@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marc Mamin <M(dot)Mamin(at)intershop(dot)de> writes:
> Yes, I undersand that serial is just a hint at table creation time, but is there a place in catalog where we can see if the table was created using 'serial' ?

No. Where the docs say "these are equivalent", they mean that very
literally.

> The difference we see between the source and target database is that a schema prefix is displayed with the sequence on one side, and not on the other..

This likely has to do with the search_path settings being different in the
sessions inspecting the two DBs. I do not think it is related to
serial-ness at all, it's just the normal behavior of regclass_out for the
OID constant that's the argument of nextval().

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2021-06-24 14:19:28 Re: How much data does server side "loread" return?
Previous Message Carlo Poso 2021-06-24 14:15:31 Re: OSX: migrating Postgres db from one Mac to another