Re: obtain the difference between successive rows

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: obtain the difference between successive rows
Дата
Msg-id CAPTjJmqP4JvHsKbyBZ+=iFN09DFVkpr6wsnzW8oHhRAs-JQEbQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: obtain the difference between successive rows  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
On Sun, Oct 21, 2012 at 3:29 AM, Raymond O'Donnell <rod@iol.ie> wrote:
> On 20/10/2012 17:23, Tom Lane wrote:
>> Having said that, they are pretty expensive.  I tend to agree that doing
>> the processing on the application side might be faster --- but only if
>> you've got a place to put such code there.  If you've just got generic
>
> True, assuming that you're working with a language that handles dates
> well... I do a lot of PHP, and have found that it's generally safer to
> handle date arithmetic in Postges.

That's because PHP is a sucky language :)

For a job like this, I'd probably whip up something in Pike. Excellent
string handling, easy database access (including an efficient
implementation of the pgsql protocol - skips the usual underlying
library and talks directly to the server), and the best Unicode
support I've seen in any application language (now equalled by Python,
as of version 3.3 that just came out). Biggest downside is that it's a
tad obscure.

object db=Sql.Sql("pgsql://username:password@hostname/database");
db->query("select blah from blah");

ChrisA


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

Предыдущее
От: Berend Tober
Дата:
Сообщение: Re: obtain the difference between successive rows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: obtain the difference between successive rows