Re: 8.1 and syntax checking at create time

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.1 and syntax checking at create time
Date: 2005-08-31 19:59:56
Message-ID: 20050831195956.GA20460@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 31, 2005 at 03:37:21PM -0400, Andrew Dunstan wrote:
> Tony Caduto wrote:
> >How can I get my restored databases to behave the same as a fresh one?
>
> Run "createlang plpgsql mydb" before running your restore, and possibly
> remove the bits that create them from the dump script, or they might
> just fail benignly.

In an already-loaded database, I think the following should work:

UPDATE pg_language SET lanvalidator = 'plpgsql_validator'::regproc
WHERE lanname = 'plpgsql';

I'd recommend wrapping the update in a transaction and making sure
only one record was updated before committing.

Tom (or anybody else), are there any gotchas with updating pg_language
like this? It works for me in simple tests.

--
Michael Fuhr

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message huaxin zhang 2005-08-31 20:08:10 Re: 8.1 and syntax checking at create time
Previous Message Jim C. Nasby 2005-08-31 19:58:17 Re: 8.1 and syntax checking at create time