BUG #1010: format_type errors oin formatting type interval.

Started by PostgreSQL Bugs Listover 22 years ago2 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

The following bug has been logged online:

Bug reference: 1010
Logged by: Jeff Davis
Email address: pg@xarg.net
PostgreSQL version: 7.4
Operating system: Linux, Mac OS X 10.3
Description: format_type errors oin formatting type interval.
Details:

head=# select version();
version
--------------------------------------------------------
PostgreSQL 7.4 on powerpc-apple-darwin7.0.0, compiled by GCC gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)

head=# select pg_catalog.format_type(oid, typlen) from pg_type where typname = 'interval';
ERROR: invalid INTERVAL typmod: 0xc

Same error on linux. Does not happen on 7.3.4.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: BUG #1010: format_type errors oin formatting type interval.

"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:

head=# select pg_catalog.format_type(oid, typlen) from pg_type where typname = 'interval';
ERROR: invalid INTERVAL typmod: 0xc

This is not a bug. format_type's second arg is typmod, not typlen.

regards, tom lane