Re: DB migration : Sybase to Postgres

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: DB migration : Sybase to Postgres
Date: 2023-05-26 14:03:36
Message-ID: 0b636573-472e-f129-c759-71a311b45fd6@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Philippe Chenel 2023-05-26 18:35:55 Re: PostgreSQL GSSAPI Windows AD
Previous Message Peter J. Holzer 2023-05-26 13:38:51 Re: DB migration : Sybase to Postgres