| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: pg_conversion seems rather strangely defined |
| Date: | 2016-01-06 01:02:16 |
| Message-ID: | 29191.1452042136@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> I still think however that search-path-based lookup of default encoding
> conversions is a Bad Idea, and that we only ought to allow one default
> conversion to exist for any pair of encodings.
> I realized that we could implement that without too much trouble by
> redefining pg_conversion.condefault as being true for default conversions
> and NULL (not false) for non-default ones. With this definition, a
> unique index on pg_conversion (conforencoding, contoencoding, condefault)
> would have the behavior we want --- sort of a poor man's partial unique
> index, except that it would work correctly on a system catalog whereas
> a true partial index wouldn't.
Turns out that indeed that works just fine. See attached draft patch.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| saner-default-conversions.patch | text/x-diff | 25.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Haribabu Kommi | 2016-01-06 01:17:46 | Re: Multi-tenancy with RLS |
| Previous Message | Petr Korobeinikov | 2016-01-06 01:00:07 | Add schema-qualified relnames in constraint error messages. |