Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group