Re: [HACKERS] string function
От | Thomas Lockhart |
---|---|
Тема | Re: [HACKERS] string function |
Дата | |
Msg-id | 37F23092.23270CDB@alumni.caltech.edu обсуждение исходный текст |
Ответ на | Re: [HACKERS] string function (Zakkr <zakkr@zf.jcu.cz>) |
Ответы |
Re: [HACKERS] string function
|
Список | pgsql-hackers |
> Try somebody implemeny strftime(),strcat() to PSQL ? - > (is any problem in PSQL, that not exist more string/date/..etc functions or > is problem with programmer absence (only) ?) It is some combination of: 1) a mild reluctance to add too many specialty functions, 2) no specific need, at least from a programmer who can make it happen, 3) unclear tradeoffs between bigger hammers causing more damage than they help, and 4) existing functionality which already does it. Oh, and 5) simply that no one has done it yet! In (almost) all cases, extensions can be put into the contrib area, and that is a good way to test out new functionality. In some cases, new functionality should go into the main tree directly. Of the cases you just mentioned: 1) strftime() allows arbitrary formatting of date/time strings. Certainly useful, though one can easily format a string that is no longer recognizable to Postgres as a date which is one reason why I didn't code it up previously. Perhaps we should focus on an Oracle-compatible routine for this; I think it uses tochar() to do formatting. Someone recently volunteered to send in code which could be used for this, but I haven't seen the code yet :( 2) strcat() concatenates two strings? There is a full set of functions which do this, and they are used to support the SQL92 concatenation operator "||". But in general, more functionality is A Good Thing, and discussing it on the hackers list is a good way to get people used to a new idea, or to evolve a new idea into something people like even better. - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California
В списке pgsql-hackers по дате отправления: