pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: rodrigo.sakai@zanthus.com.br
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Creating a new type
Date: Wed, 28 Jun 2006 10:59:45 -0400
Message-ID: <15256.1151506785@sss.pgh.pa.us> (raw)
In-Reply-To: <002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS>
References: <002a01c69ac2$1f2a8110$4700a8c0@TREEZANTHUS>

"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



view thread (2+ messages)

Message-ID: <15256.1151506785@sss.pgh.pa.us>
Permalink:  ../15256.1151506785@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15256.1151506785@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rodrigo.sakai@zanthus.com.br
  Subject: Re: Creating a new type
  In-Reply-To: <15256.1151506785@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox