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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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