pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: DB migration : Sybase to Postgres
Date: Fri, 26 May 2023 09:03:36 -0500
Message-ID: <0b636573-472e-f129-c759-71a311b45fd6@gmail.com> (raw)
In-Reply-To: <20230526133851.ekpsb2l56jpx3bks@hjp.at>
References: <CADjQTvLn=cD+Ry-uP0UkTMVoUFMpZts3_YtWib_baDm8UTSS3g@mail.gmail.com>
	<CADjQTvJbqia9EhhLpbsqH1tsZpNjTunDtjKKT5uTKJ=Q51tj6w@mail.gmail.com>
	<b39feec8-5a0b-9b8a-2835-86aba1032759@gmail.com>
	<20230526133851.ekpsb2l56jpx3bks@hjp.at>

On 5/26/23 08:38, Peter J. Holzer wrote:
> On 2023-05-25 08:10:42 -0500, Ron wrote:
>> (You can create the FKs ahead of time, but use the NOT VALID clause; then,
>> after data is loaded do ALTER TABLE ... VALIDATE CONSTRAINT.)
> I don't think this will work:
>
> | Normally, [ADD CONSTRAINT] will cause a scan of the table to verify
> | that all existing rows in the table satisfy the new constraint. But if
> | the NOT VALID option is used, this potentially-lengthy scan is
> | skipped. The constraint will still be enforced against subsequent
> | inserts or updates
> (https://www.postgresql.org/docs/current/sql-altertable.html)

I was probably thinking of tables with existing data.

-- 
Born in Arizona, moved to Babylonia.





view thread (8+ messages)

Message-ID: <0b636573-472e-f129-c759-71a311b45fd6@gmail.com>
Permalink:  ../0b636573-472e-f129-c759-71a311b45fd6@gmail.com/
Also on:    postgresql.org/message-id/0b636573-472e-f129-c759-71a311b45fd6@gmail.com

 · 

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: ronljohnsonjr@gmail.com
  Subject: Re: DB migration : Sybase to Postgres
  In-Reply-To: <0b636573-472e-f129-c759-71a311b45fd6@gmail.com>
  References: <CADjQTvLn=cD+Ry-uP0UkTMVoUFMpZts3_YtWib_baDm8UTSS3g@mail.gmail.com> <CADjQTvJbqia9EhhLpbsqH1tsZpNjTunDtjKKT5uTKJ=Q51tj6w@mail.gmail.com> <b39feec8-5a0b-9b8a-2835-86aba1032759@gmail.com> <20230526133851.ekpsb2l56jpx3bks@hjp.at> <0b636573-472e-f129-c759-71a311b45fd6@gmail.com>

* 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