Re: MS SQL to Postgres
От | Adrian Klaver |
---|---|
Тема | Re: MS SQL to Postgres |
Дата | |
Msg-id | d65d25c5-b511-4a9a-92ed-16a27797ac57@aklaver.com обсуждение исходный текст |
Ответ на | Re: MS SQL to Postgres (Avinash Vallarapu <avinash.vallarapu@gmail.com>) |
Список | pgsql-general |
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 adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: