From: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: COPY does not work with regproc and aclitem |
Date: | 2006-10-23 20:16:36 |
Message-ID: | 453D2324.2090901@sun.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2006-10-23 20:17:55 | Re: COPY does not work with regproc and aclitem |
Previous Message | Alvaro Herrera | 2006-10-23 20:13:22 | Re: COPY does not work with regproc and aclitem |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2006-10-23 20:17:55 | Re: COPY does not work with regproc and aclitem |
Previous Message | Alvaro Herrera | 2006-10-23 20:13:22 | Re: COPY does not work with regproc and aclitem |