DO hint update?

Поиск
Список
Период
Сортировка
Искать

DO hint update?

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
Does this need updating now that languages are more exensiony?  Or is it OK?
       if (!HeapTupleIsValid(languageTuple))               ereport(ERROR,                               (errcode(ERRCODE_UNDEFINED_OBJECT),                                errmsg("language \"%s\" does not
exist", languageName),                                (PLTemplateExists(languageName) ?                                 errhint("Use CREATE LANGUAGE to load
the language into the database.") : 0)));

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: DO hint update?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Robert Haas  writes:
> Does this need updating now that languages are more exensiony?  Or is
> it OK?

>         if (!HeapTupleIsValid(languageTuple))
>                 ereport(ERROR,
>                                 (errcode(ERRCODE_UNDEFINED_OBJECT),
>                                  errmsg("language \"%s\" does not
> exist", languageName),
>                                  (PLTemplateExists(languageName) ?
>                                   errhint("Use CREATE LANGUAGE to load
> the language into the database.") : 0)));

Hm ... the core languages would now prefer CREATE EXTENSION, but it's
not clear how fast non-core PLs will follow suit.

Perhaps "Use CREATE EXTENSION or CREATE LANGUAGE to load ..." ?
		regards, tom lane

Re: DO hint update?

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Mar 27, 2011, at 12:10 AM, Tom Lane  wrote:
> Hm ... the core languages would now prefer CREATE EXTENSION, but it's
> not clear how fast non-core PLs will follow suit.
> 
> Perhaps "Use CREATE EXTENSION or CREATE LANGUAGE to load ..." ?

Dear me. If we don't know what's right, how will anyone else?

...Robert

Re: DO hint update?

От:
Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Дата:
Tom Lane  writes:
> Perhaps "Use CREATE EXTENSION or CREATE LANGUAGE to load ..." ?

The only better phrasing I can think of would be to replace the or with
"then".  Or… is it practical here to look at the available extensions
and choose the HINT depending on whether the given language is there or not?

-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

FAQ