public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Avinash Vallarapu <[email protected]>
To: KK CHN <[email protected]>
Cc: [email protected]
Subject: Re: MS SQL to Postgres
Date: Wed, 20 Aug 2025 16:00:42 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAN0Tujf=C=hKL1ZOmKjGvsYc9f6L44iuE9ci0KnROJG8hrnA+w@mail.gmail.com>
References: <CAKgGyB8ZZLzDVg3eCym=BMf7+8LOS-bfOE1EdXWA_X4qha_=Xw@mail.gmail.com>
	<CAN0Tujf=C=hKL1ZOmKjGvsYc9f6L44iuE9ci0KnROJG8hrnA+w@mail.gmail.com>

On 8/20/25 15:52, Avinash Vallarapu wrote:
> Hi Krishane,
> 

>   * SQL Server often auto-generates constraint names, while PostgreSQL
>     typically requires explicit
>     names.

You will need to give more detail on above as:

create table constraint_test (id integer primary key, fld_1 varchar, 
fld_2 varchar check (fld_2 != ''), UNIQUE(fld_1, fld_2));

constraint_test
                Table "public.constraint_test"
  Column |       Type        | Collation | Nullable | Default
--------+-------------------+-----------+----------+---------
  id     | integer           |           | not null |
  fld_1  | character varying |           |          |
  fld_2  | character varying |           |          |
Indexes:
     "constraint_test_pkey" PRIMARY KEY, btree (id)
     "constraint_test_fld_1_fld_2_key" UNIQUE CONSTRAINT, btree (fld_1, 
fld_2)
Check constraints:
     "constraint_test_fld_2_check" CHECK (fld_2::text <> ''::text)

> Regards,
> Avinash Vallarapu
> +1-902-221-5976
> www.hexarocket.com <http://www.hexarocket.com;


-- 
Adrian Klaver
[email protected]






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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: MS SQL to Postgres
  In-Reply-To: <[email protected]>

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

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