Re: [HACKERS] Re: missing function datetime()

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [HACKERS] Re: missing function datetime()
Дата
Msg-id 38BAA1C2.65971352@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: missing function datetime()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Re: missing function datetime()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> I can see two ways to do that: either add another function to pg_proc
> (five of them actually :-(), or hack the parser to translate a function
> name 'datetime' to 'timestamp'.  Ugly as the second one sounds, it has
> a couple of advantages.  First, it would provide an automatic upgrade
> path: future dumps of 7.0 databases would show the correct function
> name, at least for uses in rules.  So we could hope to get rid of the
> compatibility hack someday.  Second, the parser has special treatment
> for functions that are named the same as datatypes --- it knows they
> represent type coercions --- so a function named "datetime" won't really
> work quite the way it should for type resolution.

xlateSqlFunc() is already in gram.y; enjoy...
                 - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] NOT NULL doesn't work in v7
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: missing function datetime()