| From: | Darren Duncan <darren(at)darrenduncan(dot)net> | 
|---|---|
| To: | Jaime Casanova <jaime(at)2ndquadrant(dot)com> | 
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: relation complex types | 
| Date: | 2012-06-02 19:55:00 | 
| Message-ID: | 4FCA6F94.20300@darrenduncan.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
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?
> anyway, what really kept my attention is that CREATE SEQUENCE also
> create an entry in pg_type. there is any reason for that?
This I'm fairly sure, is due to a sequence generator being implemented as a 
table/relation-typed variable, so it has a corresponding type like the regular 
table/relation-typed variables in the database.
-- Darren Duncan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2012-06-02 20:41:53 | Re: [GENERAL] pg_upgrade from 9.0.7 to 9.1.3: duplicate key pg_authid_oid_index | 
| Previous Message | Michael Nolan | 2012-06-02 16:01:16 | Re: Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers. |