Re: 8.1 and syntax checking at create time - Mailing list pgsql-hackers

From Michael Fuhr
Subject Re: 8.1 and syntax checking at create time
Date
Msg-id 20050831195956.GA20460@winnie.fuhr.org
Whole thread Raw
In response to 8.1 and syntax checking at create time  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Responses Re: 8.1 and syntax checking at create time  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 8.1 and syntax checking at create time  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
List 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


pgsql-hackers by date:

Previous
From: Matt Miller
Date:
Subject: Re: 8.1 and syntax checking at create time
Next
From: "Jim C. Nasby"
Date:
Subject: Re: 8.1 and syntax checking at create time