Re: [PATCHES] Warning for missing createlang - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: [PATCHES] Warning for missing createlang
Date
Msg-id 1062771507.66151.23.camel@jester
Whole thread Raw
In response to Re: [PATCHES] Warning for missing createlang  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, 2003-09-05 at 09:52, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.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.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Seqscan in MAX(index_column)
Next
From: Daniel
Date:
Subject: 64-bit pgsql