Re: relation complex types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Darren Duncan <darren(at)darrenduncan(dot)net>
Cc: Jaime Casanova <jaime(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: relation complex types
Date: 2012-06-02 21:13:07
Message-ID: 23608.1338671587@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Darren Duncan <darren(at)darrenduncan(dot)net> writes:
> Jaime Casanova wrote:
>> I knew that we create an entry in pg_type for every table we create,
>> what i didn't know is that we actually create 2 entries.
>> for example CREATE TABLE foo (i int); will create types foo and _foo.
>> so, any reason to create 2 entries?

> I don't know offhand; maybe its the corresponding row/tuple type and
> table/relation type?

_foo is the array type foo[]. There was bellyaching about the extra
pg_type entries when we added support for arrays of complex types,
but it was decided that trying to suppress them for table rowtypes
would be too, um, complex.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Brar Piening 2012-06-02 21:26:14 Visual Studio 2012 RC
Previous Message Tom Lane 2012-06-02 21:10:03 Re: Re: [GENERAL] pg_upgrade from 9.0.7 to 9.1.3: duplicate key pg_authid_oid_index