Peter Eisentraut <pete...@gmx.net> writes: > After gathering that there will probably be some other changes before > release that will require an initdb (even without catversion bump), and > after reexamining the issue, I think it's trivial and uncontroversial to > fix the datetime issues:
For the benefit of anyone else finding this hard to read, I've reformatted as *** src/backend/catalog/information_schema.sql.orig Tue Feb 24 11:10:16 2009 --- src/backend/catalog/information_schema.sql Tue Jun 9 14:21:37 2009 *************** *** 160,171 **** RETURNS NULL ON NULL INPUT AS $$SELECT ! CASE WHEN $2 = -1 /* default typmod */ ! THEN null WHEN $1 IN (1083, 1114, 1184, 1266) /* time, timestamp, same + tz */ ! THEN $2 WHEN $1 IN (1186) /* interval */ ! THEN $2 & 65535 ELSE null END$$; --- 160,171 ---- RETURNS NULL ON NULL INPUT AS $$SELECT ! CASE WHEN $1 IN (1082) /* date */ ! THEN 0 WHEN $1 IN (1083, 1114, 1184, 1266) /* time, timestamp, same + tz */ ! THEN CASE WHEN $2 = -1 THEN 6 ELSE $2 END WHEN $1 IN (1186) /* interval */ ! THEN CASE WHEN $2 = -1 THEN 6 ELSE $2 & 65535 END ELSE null END$$; I would suggest coding the inner cases as CASE WHEN $2 < 0 THEN ...default... since the general practice in the C code is to treat any negative value as meaning "unspecified". Otherwise, +1. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers