Extra information in pg_dump

James William Pye pgsql at jwp.name
Sun May 28 01:03:20 UTC 2006


On Mon, May 22, 2006 at 08:15:27PM -0700, Adrian Klaver wrote:
> Any clues as what all the escape sequences are for?

Okay, I brought this up on pgsql-hackers and got a response from Tom, so as it
stands now, I think I'm going to try to submit a patch to get the backend to
accept the probin value for PLs so that these dumps won't fail to load.

For the immediate moment; to get pg_dump to give something loadable, you can
NULL out the probin fields on all the 'python' language functions. Yes, it is
sick, but it does work.

UPDATE
	pg_catalog.pg_proc SET probin = NULL
WHERE
	prolang = (SELECT oid FROM pg_language WHERE lanname = 'python')

Subsequently, to get them working again on that database:

SELECT
	python_validator(oid)
FROM
	pg_proc
WHERE
	prolang = (SELECT oid FROM pg_language WHERE lanname = 'python')

Of course, if you're trying to do this on a system that needs to stay up and
call those functions, this is not going to work unless the function is already
loaded in the necessary, existing connections. In these cases, you'll probably
need to edit out the probin parts of the dump.

I'm a bit tempted to stop using probin until backends can load the dump.
However, at the same time, I'd really rather not mess with it. :(

Thoughts?


More information about the Python-general mailing list