Re: No Documentation for to_char(INTERVAL, mask)
От | Josh Berkus |
---|---|
Тема | Re: No Documentation for to_char(INTERVAL, mask) |
Дата | |
Msg-id | web-22202@davinci.ethosmedia.com обсуждение исходный текст |
Ответ на | Re: No Documentation for to_char(INTERVAL, mask) (Karel Zak <zakkr@zf.jcu.cz>) |
Список | pgsql-sql |
karel, > Now I'm not writing to_char(interval), because current source (7.1) > is > freeze for new features and I'm waiting for 7.2 devel. cycle and I'm > spending > time with other things (PL/Python, the Mape project etc..). > > If it's *really important* for you I can write it next week(s), > ... of course, my time is limited :-) Hey, if I wanted that, there'd be a consulting fee involved, hey? Actually, I just changed the field to VARCHAR and provided a limited range of options. Since there is not to_char('7 +00:00:00') yet, but interval('1 month') works great, it makes more sense to store my data as text. Since I'm not writing the temporary interval2char function, I'll mention that it seemed to me that it could be broken down into a series of IF ... THEN statements either testing DATEPART or against other INTERVAL values. A string could be built against the components of the Interval. Now, two follow-up questions: 1. Does ALTER TABLE in 7.1 beta 4 allow DROP COLUMN? I can't seem to get it to work. 2. Has anyone given thought to a VB-style SELECT CASE (which we should call 'SELECT MATCH') statement in PL/pgSQL? Different from the CASE that allows you to select column values in the SELECT clause, SELECT MATCH would be an IF ... THEN style structure offering an indefinite numebr of options. I'm sure that PL/SQL has something like this ... I'll look it up later today. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco
В списке pgsql-sql по дате отправления: