Re: Problems with PLPGSQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problems with PLPGSQL
Дата
Msg-id 19411.1068130461@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problems with PLPGSQL  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Richard Huxton <dev@archonet.com> writes:
> On Thursday 06 November 2003 10:00, Alex wrote:
>> as for the timestamp, both ways work fine, but the other problem still
>> exists. using a
>> ''60 Min'' works just fine, but WHERE job_end + ($1::text || '' Min'' )

> You probably want a cast:
>  + ($1::text || '' min'')::interval

This is pretty much the hard way, though.  A better idea is to use the
number-times-interval operator:

    timestampvalue + $1 * '1 min'::interval;

Easier to write and faster.

            regards, tom lane

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

Предыдущее
От: George Essig
Дата:
Сообщение: Re: tsearch2 and gist index bloat
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: INSERT and UPDATE of ALLBALLS/INFINITY dates and MOVE