Re: [PATCHES] Warning for missing createlang

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Warning for missing createlang
Date: 2003-09-05 14:18:28
Message-ID: 1062771507.66151.23.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, 2003-09-05 at 09:52, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > Bruce Momjian wrote:
> >>> HINT: Perhaps you need to use 'createlang' to load the language into
> >>> the database, or you mistyped the language name.
>
> > Why not list out the languages we *do* know about, and tell them it's
> > not in the list? Or is that too much work?
>
> Seems like it would clutter the error message without really addressing
> Bruce's concern. I doubt that seeing the list of available languages
> would do much to jog a newbie's memory about needing to run createlang.

Ok, it's a hint right? Step 1 is to merge the fuzzystrmatch contrib
module into main line code. Step 2 is to use that code to determine a
close match.

CREATE FUNCTION .... LANGUAGE 'plgsql';

System notices the error, and looks for languages in pg_language that
have similar names to 'plgsql', finds 'plpgsql'.

ERROR: Language 'plgsql' not found
HINT: Perhaps you intended to use the language 'plpgsql?

Lots of work (both to implement and maintain) but it would be a neat
trick.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel 2003-09-05 14:22:26 64-bit pgsql
Previous Message Tom Lane 2003-09-05 14:12:41 Re: Seqscan in MAX(index_column)

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2003-09-05 15:34:17 Re: doc patch - linux memory handling
Previous Message Tom Lane 2003-09-05 13:52:41 Re: [PATCHES] Warning for missing createlang