pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marc Mamin <M.Mamin@intershop.de>
To: Marc Mamin <M.Mamin@intershop.de>
To: Joe Conway <mail@joeconway.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: RE: removing "serial" from table definitions.
Date: Thu, 24 Jun 2021 14:03:54 +0000
Message-ID: <ab8f18cfd94a48568f0bb3d50a6d61e5@intershop.de> (raw)
In-Reply-To: <5ef2dc435bd749caaf73015c4cc5a626@intershop.de>
References: <feaeb83188034e9e88fcaeb33225b22c@intershop.de>
	<e409f4c5-ff1d-dd6f-b34b-c2383a62f61b@joeconway.com>
	<5ef2dc435bd749caaf73015c4cc5a626@intershop.de>

>serial is not an actual data type -- it is essentially an integer with a default and an automatically created sequence. See:
>>
>>https://www.postgresql.org/docs/13/datatype-numeric.html#DATATYPE-SERIA
>>L
>
>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' ?
>if yes, I'm looking for a way to remove that.
>
>Another cause for my problem may be in the way how the default value information is stored in pg_attrdef.
>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..
>I'm not sure yet if this really come directly from the catalog or from the way how the client read the table definition, maybe along with some search_path differences Were there any change in this area between PG 9.6 and PG 11 ?
>
>example:
>
>The Default value of column 'id' in table 'db_jobs_history' in database 'oms_db' is different on source and target servers. 
>It's 'nextval('admin.db_jobs_history_id_seq'::regclass)' on source  and 'nextval('db_jobs_history_id_seq'::regclass)' on target.

I've probably found the origin of our problem:

https://www.postgresql.org/docs/9.3/release-8-1.html
 => Add proper dependencies for arguments of sequence functions (Tom)
 
But I won't be able to check that in the next few days..

best regards,
marc Mamin


view thread (6+ messages)  latest in thread

Message-ID: <ab8f18cfd94a48568f0bb3d50a6d61e5@intershop.de>
Permalink:  ../ab8f18cfd94a48568f0bb3d50a6d61e5@intershop.de/
Also on:    postgresql.org/message-id/ab8f18cfd94a48568f0bb3d50a6d61e5@intershop.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: M.Mamin@intershop.de, mail@joeconway.com
  Subject: Re: removing "serial" from table definitions.
  In-Reply-To: <ab8f18cfd94a48568f0bb3d50a6d61e5@intershop.de>
  References: <feaeb83188034e9e88fcaeb33225b22c@intershop.de> <e409f4c5-ff1d-dd6f-b34b-c2383a62f61b@joeconway.com> <5ef2dc435bd749caaf73015c4cc5a626@intershop.de> <ab8f18cfd94a48568f0bb3d50a6d61e5@intershop.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox