Re: Creating a new type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rodrigo(dot)sakai(at)zanthus(dot)com(dot)br
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Creating a new type
Date: 2006-06-28 14:59:45
Message-ID: 15256.1151506785@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

"Rodrigo Sakai" <rodrigo(dot)sakai(at)zanthus(dot)com(dot)br> writes:
> So, when I execute an INSERT operation on this table, the functions that
> deals with this type need the id or name of the table that the data was
> inserted!

Why? Your example datatype doesn't seem to require any such thing.

> How can I get this ID or NAME inside this functions???

You can't. The question itself is bogus because it assumes that data
values only exist within tables. You could not have a transient value
of the datatype (eg, a function result) because that is not stored in
any table.

regards, tom lane

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Robert Wimmer 2006-06-28 17:40:09 Re: jdbc windows
Previous Message Rodrigo Sakai 2006-06-28 14:49:56 Creating a new type