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

From Tom Lane
Subject Re: [PATCHES] Warning for missing createlang
Date
Msg-id 9599.1062769961@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Warning for missing createlang  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: [PATCHES] Warning for missing createlang
Re: [PATCHES] Warning for missing createlang
List pgsql-hackers
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.

We could answer my objection about the hint popping out on misspelled
language names if the code were to arrange to put out the hint only when
the language name is one of "plpgsql", "pltcl", "pltclu", etc.  This
would have to use a hard-coded list of loadable language names, since
by definition looking in pg_language won't help.  It would be enough of
a maintenance PITA that I don't especially want to do it ... but it
would ensure that the hint is likely to be relevant.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Samuel A Horwitz
Date:
Subject: AIX 4.2.1 CVS head and SSL
Next
From: Bruce Momjian
Date:
Subject: Re: TCP/IP with 7.4 beta2 broken?