pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zdenek Kotala <Zdenek.Kotala@Sun.COM>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: COPY does not work with regproc and aclitem
Date: Mon, 23 Oct 2006 22:16:36 +0200
Message-ID: <453D2324.2090901@sun.com> (raw)
In-Reply-To: <27990.1161634170@sss.pgh.pa.us>
References: <453D1B73.2050906@sun.com>
	<20061023200200.GD11409@alvh.no-ip.org>
	<27990.1161634170@sss.pgh.pa.us>

Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Hmm, maybe it should be using regprocedure instead?
> 
> Not unless you want to break initdb.  The only reason regproc still
> exists, really, is to accommodate loading of pg_type during initdb.
> Guess what: we can't do type lookup at that point.

Do you mean something like this:


Datum
regprocout(PG_FUNCTION_ARGS)
{

   ...

   if( donot_resolve_procname == TRUE)
   {
      result = (char *) palloc(NAMEDATALEN);
      snprintf(result, NAMEDATALEN, "%u", proid);
   }

   ...

   PG_RETURN_CSTRING(result);
}


donot_resolve_procname will be set when COPY will be performed.


	Zdenek



view thread (18+ messages)  latest in thread

Message-ID: <453D2324.2090901@sun.com>
Permalink:  ../453D2324.2090901@sun.com/
Also on:    postgresql.org/message-id/453D2324.2090901@sun.com

 · 

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-hackers@postgresql.org
  Cc: Zdenek.Kotala@Sun.COM, tgl@sss.pgh.pa.us, alvherre@commandprompt.com
  Subject: Re: COPY does not work with regproc and aclitem
  In-Reply-To: <453D2324.2090901@sun.com>

* 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