From: Martijn van Oosterhout <kleptog@svana.org>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Ashish Karalkar <ashish.karalkar@info-spectrum.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] function to find difference between in days between two dates
Date: Thu, 14 Jun 2007 13:14:03 +0200
Message-ID: <20070614111403.GA11436@svana.org> (raw)
In-Reply-To: <162867790706140000w478d4bds4a0a2f42a8666a26@mail.gmail.com>
References: <006101c7ae4c$ed7edbd0$170211ac@LIONKING.COM>
<162867790706140000w478d4bds4a0a2f42a8666a26@mail.gmail.com>
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.
Attachments:
signature.asc (application/pgp-signature, 188B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: kleptog@svana.org, pavel.stehule@gmail.com, ashish.karalkar@info-spectrum.com, pgsql-general@postgresql.org
Subject: Re: [SQL] function to find difference between in days between two dates
In-Reply-To: <20070614111403.GA11436@svana.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox