On Wed, May 28, 2014 at 4:27 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > One of these doesn't belong: > > postgres=# select typname, typcategory from pg_type where typispreferred; > typname | typcategory > -------------+------------- > bool | B > text | S > oid | N > float8 | N > inet | I > timestamptz | D > interval | T > varbit | V > pg_lsn | U > (9 rows) > > Was there any actual rationale to this, or was it just somebody who did > not understand what that bit is for? Looks like an oversight of the pg_lsn patch. You could blame me for that I suppose...
> I think it's probably mostly harmless given the lack of casts to or from > pg_lsn, but it's still a darn bad idea to have any preferred types in the > 'U' category. If we leave it like this it will bite us in the rear > eventually. > The most expedient response at this late date seems to be to change the > entry in pg_type.h without bumping catversion. That way at least it > will be right in databases initdb'd after beta2. Agreed. Attached patch fixes that, but I am sure that you already figured it out. -- Michael
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index a8abc0f..b7d9256 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -578,7 +578,7 @@ DESCR("UUID datatype"); DATA(insert OID = 2951 ( _uuid PGNSP PGUID -1 f b A f t \054 0 2950 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ )); /* pg_lsn */ -DATA(insert OID = 3220 ( pg_lsn PGNSP PGUID 8 FLOAT8PASSBYVAL b U t t \054 0 0 3221 pg_lsn_in pg_lsn_out pg_lsn_recv pg_lsn_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ )); +DATA(insert OID = 3220 ( pg_lsn PGNSP PGUID 8 FLOAT8PASSBYVAL b U f t \054 0 0 3221 pg_lsn_in pg_lsn_out pg_lsn_recv pg_lsn_send - - - d p f 0 -1 0 0 _null_ _null_ _null_ )); DESCR("PostgreSQL LSN datatype"); #define LSNOID 3220 DATA(insert OID = 3221 ( _pg_lsn PGNSP PGUID -1 f b A f t \054 0 3220 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers