On Thu, Feb 10, 2005 at 10:31:40AM -0700, Michael Fuhr wrote:
>
> UPDATE tablename SET col1 = , col2 = , ...
> WHERE keycol =
> AND (col1 IS DISTINCT FROM OR
>col2 IS DISTINCT FROM ...)
You could also do this with a trigger. If all columns in the old
and new rows are identical, then
On Fri, Feb 11, 2005 at 09:26:22AM -0500, Jan wrote:
>
> I've never seen that syntax. Is that ANSI standard?
If you're referring to IS DISTINCT FROM, it's defined in SQL:1999
and SQL:2003.
> The last SQL database I used did not require that syntax to return the
> "affected" count I needed.
Tha
From: "Michael Fuhr" <[EMAIL PROTECTED]>
To: "Jan" <[EMAIL PROTECTED]>
Cc:
Sent: Thursday, February 10, 2005 12:31 PM
Subject: Re: [GENERAL] pg_affected Change Request
> On Thu, Feb 10, 2005 at 05:56:33AM -0500, Jan wrote:
> >
> > I write a
On Thu, Feb 10, 2005 at 05:56:33AM -0500, Jan wrote:
>
> I write a program that mines data from a small few websites. I revisit
> those websites on a daily basis. I find a matching key (actually two fields
> comprise my unique key) and with the data collected on this visit I attempt
> to UPDATE
On Wed, Feb 09, 2005 at 09:50:41PM -0500, Jan wrote:
> I've been using PostgreSQL for about three months. So far my
> only objection is that "pg_affected" provides the number of attempts
> rather than the number of rows that are actually changed. I could
> easily do that with a little counter.