pgsql/src/backend/commands define.c

Started by Bruce Momjianalmost 25 years ago3 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

CVSROOT: /cvsroot
Module name: pgsql
Changes by: momjian@postgresql.org 01/10/12 21:35:25

Modified files:
src/backend/commands: define.c

Log message:
Mention createlang when language not installed, per problem report.

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Bruce Momjian (#1)
Re: pgsql/src/backend/commands define.c

momjian@postgresql.org writes:

Mention createlang when language not installed, per problem report.

I think this is inappropriate. It's quite possible that an ordinary user
is trying to create a function in a non-existent language, and he won't
have the authority to use createlang. Or the language name is a typo and
the language doesn't exist at all. Or the language is provided by a third
party and createlang doesn't support it.

You will find that almost nowhere a program will report 'foo not found --
use bar to install it' because 'foo' missing might be fully intentional.
(Or otherwise one might ask, if the program knows how to fix the
situation, why doesn't it do so itself?)

A user that has problems in this area can read the CREATE FUNCTION man
page and find a reference to createlang there (or should find one).

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter

#3Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#2)
Re: pgsql/src/backend/commands define.c

momjian@postgresql.org writes:

Mention createlang when language not installed, per problem report.

I think this is inappropriate. It's quite possible that an ordinary user
is trying to create a function in a non-existent language, and he won't
have the authority to use createlang. Or the language name is a typo and
the language doesn't exist at all. Or the language is provided by a third
party and createlang doesn't support it.

You will find that almost nowhere a program will report 'foo not found --
use bar to install it' because 'foo' missing might be fully intentional.
(Or otherwise one might ask, if the program knows how to fix the
situation, why doesn't it do so itself?)

A user that has problems in this area can read the CREATE FUNCTION man
page and find a reference to createlang there (or should find one).

But people report this error all the time and obviously don't understand
they need to use createlang. Doesn't hurt to point them to it. If it
is a typo, they will figure it out.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026