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: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.1 and syntax checking at create time
Date: 2005-08-31 20:39:47
Message-ID: 20050831203946.GA20699@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-hackers
[Please don't top-post; it destroys the conversational flow.  I've
moved your comment below what you commented on.]

On Wed, Aug 31, 2005 at 03:13:02PM -0500, Tony Caduto wrote:
> >In an already-loaded database, I think the following should work:
> >
> >UPDATE pg_language SET lanvalidator = 'plpgsql_validator'::regproc
> >WHERE lanname = 'plpgsql';
>
> When I run this I get this error in the database:
> PostgreSQL Error Code: (1)
> ERROR:  function "plpgsql_validator" does not exist

Oops...createlang would ordinarily create that function, but since
you restored from another database the validator function was never
created.  Try adding this before the UPDATE (stolen from pg_dump):

CREATE FUNCTION pg_catalog.plpgsql_validator(oid) RETURNS void
AS '$libdir/plpgsql', 'plpgsql_validator'
LANGUAGE c;

-- 
Michael Fuhr

In response to

pgsql-hackers by date

Next:From: Tony CadutoDate: 2005-08-31 20:41:03
Subject: Re: 8.1 and syntax checking at create time
Previous:From: Tom LaneDate: 2005-08-31 20:23:44
Subject: Re: 8.1 and syntax checking at create time

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