The function format_type() fails only for interval when used on the
interval type

template1=# select format_type(oid, typlen) from pg_type;
ERROR:  invalid INTERVAL typmod: 0xc
template1=# select format_type(oid, typlen) from pg_type where typname
!= 'interval';
-- Many results



Mon, 26 Apr 2004 21:36:26 -0400
Rod Taylor <pg@rbt.ca>
Broken Catalog? -- 7.4.2
On Mon, Apr 26, 2004 at 09:36:26PM -0400, Rod Taylor wrote:
> The function format_type() fails only for interval when used on the
> interval type
> 
> template1=# select format_type(oid, typlen) from pg_type;

select format_type(oid, typtypmod) from pg_type;
-- works

In fact, I believe this is the correct answer from timestamp types, for
example.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Having your biases confirmed independently is how scientific progress is
made, and hence made our great society what it is today" (Mary Gardiner)

Mon, 26 Apr 2004 22:04:13 -0400
Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: Broken Catalog? -- 7.4.2
On Mon, 2004-04-26 at 22:04, Alvaro Herrera wrote:
> On Mon, Apr 26, 2004 at 09:36:26PM -0400, Rod Taylor wrote:
> > The function format_type() fails only for interval when used on the
> > interval type
> > 
> > template1=# select format_type(oid, typlen) from pg_type;
> 
> select format_type(oid, typtypmod) from pg_type;
> -- works
> 
> In fact, I believe this is the correct answer from timestamp types, for
> example.

Yes, your right. The only differences are with the timestamp types and
interval.

No matter -- I still have a bug in DBD::Pg ;)


Tue, 27 Apr 2004 08:48:22 -0400
Rod Taylor <pg@rbt.ca>
Re: Broken Catalog? -- 7.4.2