Re: [PATCHES] Warning for missing createlang

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: [PATCHES] Warning for missing createlang
Дата
Msg-id 1062771507.66151.23.camel@jester
обсуждение исходный текст
Ответ на Re: [PATCHES] Warning for missing createlang  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Seqscan in MAX(index_column)
Следующее
От: Daniel
Дата:
Сообщение: 64-bit pgsql