Re: hint infrastructure setup (v3)

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: hint infrastructure setup (v3)
Дата
Msg-id 20040402181204.T40651@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: hint infrastructure setup (v3)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: hint infrastructure setup (v3)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: hint infrastructure setup (v3)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: hint infrastructure setup (v3)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-patches
On Fri, 2 Apr 2004, Bruce Momjian wrote:

> Fabien COELHO wrote:
> > CREATE USER calvin WITH IN GROUP admin, CREATEDB;
> > ERROR:  group "admin" does not exist
> >
> > CREATE USER calvin WITH IN GROUP admin CREATEDB foo;
> > ERROR:  syntax error at or near "foo" at character 49
> > HINT:  other user options or ';' expected
> >
> > CREATE USER calvin NOCREATEUSER CREATEDB foo;
> > ERROR:  syntax error at or near "foo" at character 42
> > HINT:  other user options or ';' expected
> >
> > CREATE USER calvin CREATEUSER foo;
> > ERROR:  syntax error at or near "foo" at character 31
> > HINT:  other user options or ';' expected
>
> I hate to say it but I don't see these hints as being very helpful.

I can see them as potentially being useful for people who don't have alot
of knowledge of SQL or our dialect thereof.  I think some of the ones
shown may need better wording (for example the ones above basically seem
to mean go look at the help for create user which is pretty much the same
as the error on its own, but perhaps with a longer hint, it might be less
so) but I think it illustrates the point for these kinds of queries.  I'm
not sure that the HINT strings would be as meaningful in the middle of
complicated select/update/etc queries, but that would be something to see.

I'm not sure it's PostgreSQL's responsibility to teach SQL or even really
to teach our own commands, but if it were possible to do without much of a
performance, readability or maintenance cost, it'd probably be worth
doing.  I can't really say much specifically about the patch either way on
any of those grounds (having not actually looked).


В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: hint infrastructure setup (v3)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: hint infrastructure setup (v3)