Re: CREATE TABLE LIKE INCLUDING INDEXES support - Mailing list pgsql-patches

From NikhilS
Subject Re: CREATE TABLE LIKE INCLUDING INDEXES support
Date
Msg-id d3c4af540705170609n21911a2ja9314d4db9d230d3@mail.gmail.com
Whole thread Raw
In response to Re: CREATE TABLE LIKE INCLUDING INDEXES support  (Neil Conway <neilc@samurai.com>)
Responses Re: CREATE TABLE LIKE INCLUDING INDEXES support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Hi,

Nope:

neilc=# create table t1 (a int, b int);
CREATE TABLE
neilc=# create unique index t1_a_idx on t1 ((a + b)) where (a > 5);
CREATE INDEX

I just now realized that even though we allow the above. We do not allow:

pg=# create table t1 (a int, b int, unique(a+b));

nor the where clause syntax.

Any specific reason for this behaviour?

If we want to pass such kinds of expr, predicate based constraints via the "LIKE .. INCLUDING CONSTRAINTS" statements, transformIndexConstraints as well as the Constraint structure might need modifications.

Regards,
Nikhils
 
--
EnterpriseDB               http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: "FAST PostgreSQL"
Date:
Subject: Re: Updateable cursors patch
Next
From: Bruce Momjian
Date:
Subject: Re: Updateable cursors patch