Re: COPY does not work with regproc and aclitem - Mailing list pgsql-hackers

From Zdenek Kotala
Subject Re: COPY does not work with regproc and aclitem
Date
Msg-id 453D2324.2090901@sun.com
Whole thread Raw
In response to Re: COPY does not work with regproc and aclitem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: COPY does not work with regproc and aclitem
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: COPY does not work with regproc and aclitem
Next
From: Tom Lane
Date:
Subject: Re: COPY does not work with regproc and aclitem