Re: [GENERAL] pg_affected Change Request

2005-02-14 Thread Michael Fuhr
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

Re: [GENERAL] pg_affected Change Request

2005-02-14 Thread Michael Fuhr
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

Re: [GENERAL] pg_affected Change Request

2005-02-14 Thread Jan
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

Re: [GENERAL] pg_affected Change Request

2005-02-10 Thread Michael Fuhr
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

Re: [GENERAL] pg_affected Change Request

2005-02-09 Thread Michael Fuhr
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.