Re: [SQL] function to find difference between in days between two dates

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [SQL] function to find difference between in days between two dates
Дата
Msg-id 20070614111403.GA11436@svana.org
обсуждение исходный текст
Ответ на Re: [SQL] function to find difference between in days between two dates  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Ответы Re: [SQL] function to find difference between in days between two dates  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-general
On Thu, Jun 14, 2007 at 09:00:12AM +0200, Pavel Stehule wrote:
> Hello
>
> PostgreSQL hasn't any official function for it. If you need it, you
> can write own function

Not true. Anything that is done by an operator as actually done by a
function. So the function exists:

# \df date_mi
                       List of functions
   Schema   |  Name   | Result data type | Argument data types
------------+---------+------------------+---------------------
 pg_catalog | date_mi | integer          | date, date
(1 row)

You may have to dig through the pg_operator table to find it though.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Marco Colombo
Дата:
Сообщение: Re: PostGreSQL for a small Desktop Application
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: pg_xlog - files are guaranteed to be sequentialynamed?