Re: [PATCHES] Warning for missing createlang

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Warning for missing createlang
Date: 2003-09-05 07:24:49
Message-ID: 3F583A41.108@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian wrote:

>Bruce Momjian wrote:
>
>
>>I have written a patch to issue an hint if someone tries to create a
>>function in a language that isn't loaded into the database:
>>
>> test=> CREATE FUNCTION xx() RETURNS INT AS '
>> test'> select 1'
>> test-> LANGUAGE 'plpgsql';
>> ERROR: language "plpgsql" does not exist
>> HINT: Perhaps you need to use 'createlang' to load the language into
>> the database.
>>
>>I know Peter didn't like this idea in the past, but we are getting too
>>many people who forget createlang, and with our new HINT tags, it seems
>>appropriate.
>>
>>
>
>OK, Peter and Tom don't like it. :-(
>
>How about this, that also suggests you mistyped the name:
>
>
>
>> 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?

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joerg Hessdoerfer 2003-09-05 07:27:49 Re: [HACKERS] Win32 native port
Previous Message Andrew Dunstan 2003-09-05 07:16:54 Re: TCP/IP with 7.4 beta2 broken?

Browse pgsql-patches by date

  From Date Subject
Next Message Andriy Tkachuk 2003-09-05 08:05:57 Re: doc patch - linux memory handling
Previous Message Bruce Momjian 2003-09-05 04:01:17 Re: Warning for missing createlang