pg_proc probin misuse - Mailing list pgsql-hackers

From James William Pye
Subject pg_proc probin misuse
Date
Msg-id 20060527024146.GA54336@lit.jwp.name
Whole thread Raw
Responses Re: pg_proc probin misuse
List pgsql-hackers
Hi,

In PL/Py, I had the bright idea of storing bytecode in the probin field of the
function's pg_proc row. However, this idea has lately become rather dim as I
have recently rediscovered(thanks Adrian) that this breaks dumps; pg_dump outputs
a PL/Py function as "CREATE FUNCTION x() RETURNS y LANGUAGE python AS
'<bytecode>', '<source>'". Of course, when loading this, it fails:
'ERROR:  only one AS item needed for language "python"'.

So is this "fix your broken PL" or "pg_dump should only be doing that for C
language functions"? I imagine the former, so if that is the case perhaps
the 'probin' column description at [1] should be reworded to ensure others don't
get the same bright idea(the "language specific" part in particular).
Ugh, even if it were the latter, I would still be breaking existing versions,
so I'm inclined to fix it regardless..

Have a good evening (afternoon, morning, etc :).

[1] http://www.postgresql.org/docs/8.1/static/catalog-pg-proc.html
[Yeah, I do see the clarification at the bottom of the page. :( ]


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Updatable views/with check option parsing
Next
From: Tom Lane
Date:
Subject: Re: Updatable views/with check option parsing