Re: Creating a new type - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Creating a new type
Date
Msg-id 15256.1151506785@sss.pgh.pa.us
Whole thread Raw
In response to Creating a new type  ("Rodrigo Sakai" <rodrigo.sakai@zanthus.com.br>)
Responses RES: Creating a new type
List pgsql-interfaces
"Rodrigo Sakai" <rodrigo.sakai@zanthus.com.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


pgsql-interfaces by date:

Previous
From: "Rodrigo Sakai"
Date:
Subject: Creating a new type
Next
From: "Robert Wimmer"
Date:
Subject: Re: jdbc windows