Re: Slow UPADTE, compared to INSERT

From: Ivar Zarans <iff(at)alcaron(dot)ee>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow UPADTE, compared to INSERT
Date: 2003-12-05 13:13:25
Message-ID: 20031205131325.GB27524@alcaron.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Dec 05, 2003 at 06:19:46PM +0530, Shridhar Daithankar wrote:

> >is correct SQL, but not correct, considering PostgreSQL bugs.
>
> Personally I don't consider a bug but anyways.. You are the one facing
> problem so I understand..

Well, if this is not bug, then what is consideration behind this
behaviour? BTW, according to Cristopher it is fixed in 7.5 CVS.
Why fix it if this is not a bug? :))

One more question - is this "feature" related only to "bigint" fields,
or are other datatypes affected as well?

> Will following help?
>
> qry = "UPDATE table1 SET status = %s WHERE recid = '%s'"
> cursor.execute(qry, status, recid)

Yes, this helps. But then it sort of obsoletes PyPgSQL-s own quoting
logic. I would prefer to take care of this all by myself or trust some
underlying code to do this for me. And PyPgSQL is quite nice - it
checks datatype and acts accordingly.

--
Ivar

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2003-12-05 13:23:43 Re: Slow UPADTE, compared to INSERT
Previous Message Shridhar Daithankar 2003-12-05 12:49:46 Re: Slow UPADTE, compared to INSERT