Re: Exposing keywords to clients
От | Dave Page |
---|---|
Тема | Re: Exposing keywords to clients |
Дата | |
Msg-id | 937d27e10805031244h5f08a772l77e0f35b019b4f31@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Exposing keywords to clients (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Exposing keywords to clients
Re: Exposing keywords to clients |
Список | pgsql-patches |
On Sat, May 3, 2008 at 6:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Peter Eisentraut <peter_e@gmx.net> writes: > > Is there anything useful you would do with this information? Or would you > > just quote all listed words anyway? Currently, yes, we just quote all listed words. > I think the practical application would be to avoid quoting unreserved > keywords, as pg_dump for instance already does. I doubt anyone would > bother distinguishing the different types of partially/wholly reserved > words. So maybe a boolean would be sufficient --- but I have nothing > against the R/T/C/U suggestion. > > A more radical alternative is just to omit unreserved words from the > view altogether. Well my thinking is that it costs nothing extra bar a dozen lines of code to include the info now in case it's useful in the future, if not for pgAdmin, then maybe for Lightning Admin or one of the other tools. If a need for it arises in the future and we haven't included it now we'll either want to add a second function or break compatibility both of which strike me as a lot more objectionable than doing it all now. Attached is an updated patch, giving the following output. The catdesc column can be translated. postgres=# select * from pg_get_keywords(); word | catcode | catdesc -------------------+---------+----------------------- abort | U | Unreserved all | R | Reserved bigint | C | Column name binary | T | Type or function name -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Вложения
В списке pgsql-patches по дате отправления: