Re: fixing CREATEROLE - Mailing list pgsql-hackers

From walther@technowledgy.de
Subject Re: fixing CREATEROLE
Date
Msg-id 0883f5cf-ff96-847b-127a-496efebc476f@technowledgy.de
Whole thread Raw
In response to Re: fixing CREATEROLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: fixing CREATEROLE
Re: fixing CREATEROLE
List pgsql-hackers
Tom Lane:
> No, we don't support partial indexes on catalogs, and I don't think
> we want to change that.  Partial indexes would require expression
> evaluations occurring at very inopportune times.

I see. Is that the same for indexes *on* an expression? Or would those 
be ok?

With a custom operator, an EXCLUDE constraint on the ROW(reldatabase, 
relname) expression could work. The operator would compare:
- (0, name1) and (0, name2) as name1 == name2
- (db1, name1) and (0, name2) as name1 == name2
- (0, name1) and (db2, name2) as name1 == name2
- (db1, name1) and (db2, name2) as db1 == db2 && name1 == name2

or just (db1 == 0 || db2 == 0 || db1 == db2) && name1 == name2.

Now, you are going to tell me that EXCLUDE constraints are not supported 
on catalogs either, right? ;)

Best,

Wolfgang



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Code checks for App Devs, using new options for transaction behavior
Next
From: Alexander Pyhalov
Date:
Subject: Re: Partial aggregates pushdown