> If you really want a flexible function for doing this, I suspect you could
replicate the functionality of jquery's 'timeago' module in a stored proc
relatively easily. http://timeago.yarp.com/ It is MIT licensed, so you can
copy the logic without restriction. It makes reference to being derivati
postgresql.org
Subject: Re: [SQL] Calculating relative time/distance from CURRENT_TIMESTAMP
Have you looked into the date time functions already ?
http://www.postgresql.org/docs/9.0/static/functions-datetime.html
Amitabh Kant
On Thu, Aug 4, 2011 at 1:24 PM, Gnanakumar wrote:
Hi,
Is there any
Hi,
Is there any built-in function/add-on module available in PostgreSQL, that
converts a given "timestamp"/"timestamptz" value into its relative distance
from CURRENT_TIMESTAMP? For example, relative distance as today, yesterday,
5 minutes ago, 1 week ago, etc.
Regards,
Gnanam
--
Sent via p
Hi Dmitriy Igrishin,
Thanks. That's a good idea too.
From: Dmitriy Igrishin [mailto:dmit...@gmail.com]
Sent: Saturday, February 19, 2011 3:31 PM
To: gna...@zoniac.com
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Is it possible to get DISTINCT rows from RETURNING clause?
Hey Gnana
Any ideas?
-Original Message-
From: Gnanakumar [mailto:gna...@zoniac.com]
Sent: Thursday, February 17, 2011 12:36 PM
To: pgsql-sql@postgresql.org
Subject: Is it possible to get DISTINCT rows from RETURNING clause?
Hi,
Is it possible to get DISTINCT rows from an UPDATE statement using
Hi,
Is it possible to get DISTINCT rows from an UPDATE statement using RETURNING
clause?
"MYTABLE" columns are:
APRIMARYKEYCOLUMN
ABOOLEANCOLUMN
EMAIL
COLUMN1
COLUMN2
COLUMN3
UPDATE using RETURNING clause query:
UPDATE MYTABLE SET ABOOLEANCOLUMN =
Hi,
We're running PostgreSQL v8.2.3 on RHEL5.
In some places in our application, we use Regular Expression Match Operator
(~* => Matches regular expression, case insensitive) inside WHERE criteria.
Example:
SELECT ...
FROM ...
WHERE (SKILLS ~*
'(^|\\^|\\||[^0-9|^a-z|^A-Z]|$)C#(^|\\^|\\||[^0-9|^
Hi Rob,
> I'm sure most will urge you to move to UTF-8 encoding asap.
Did you mean the database encoding to changed from SQL_ASCII to UTF-8?
> Have you tracked down the "offending" insert statement? Perhaps it's a
> trigger trying to generate a log message?
No, I don't have any trigger on this t
Hi,
Because there was no response for this question already posted in
pgsql-j...@postgresql.org mailing list, I'm posting it here.
I'm using PostgreSQL 8.2 and my production server is based on CentOS release
5.2 (Final).
JDBC Jar: postgresql-8.2-508.jdbc4.jar
I noticed from my server log that s