Re: pg_type.typname of array types. - Mailing list pgsql-hackers

From Dmitriy Igrishin
Subject Re: pg_type.typname of array types.
Date
Msg-id AANLkTikQ-62xM49qZR8qK8M4KU_PfJB7Ga3Dnm8kcgKw@mail.gmail.com
Whole thread
In response to Re: pg_type.typname of array types.  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Hey Andrew,

Finally convinced. Thanks!

2010/12/8 Andrew Dunstan <andrew@dunslane.net>


On 12/08/2010 05:35 AM, Dmitriy Igrishin wrote:
Hey hackers@,

Is it guaranteed that name of array types in pg_type system
catalog will always be prefixed by underscore or this convention
can be changed in future ?




It is not guaranteed today, let alone in the future, that the array type for x will be _x for any x.

Consider:

  andrew=# create type _foo as (x int); create type foo as (y
  text);select typname from pg_type where oid = (select typarray from
  pg_type where typname = 'foo');
  CREATE TYPE
  CREATE TYPE
    typname
  ---------
    ___foo
  (1 row)


cheers

andrew




--
// Dmitriy.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_type.typname of array types.
Next
From: Marti Raudsepp
Date:
Subject: Re: unlogged tables