Re: Update Query doesn't affect all records

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Schindler Andor <schindler(dot)andor(at)pokhalo(dot)hu>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Update Query doesn't affect all records
Date: 2009-08-05 17:27:52
Message-ID: dcc563d10908051027g11b213dbkdfdc85fe0b74fea@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 5, 2009 at 6:56 AM, Csaba Nagy<nagy(at)ecircle-ag(dot)com> wrote:
> Hi Andor,
>
> On Wed, 2009-08-05 at 14:15 +0200, Schindler Andor wrote:
>> Can anyone tell me, how this is possible? If we insert 12 on the end, then
>> it decreases, but 11 remains the same. The problem only occurs, when the
>> where condition contains "sorrend > 9" or less.
>
> I bet the "sorrend" column is of some text type, and the "sorrend > 9"
> comparison is a text comparison. Try "sorrend::integer > 9" and it
> should work ;-)

That's kinda what I was thinking at first, but the pastebin he posted
showed them in proper int type order. So I'm not sure why it's doing
what it's doing. I'd ask Schinlder if he could post a completely self
contained example of the problem, including the create table and
insert statements used to create the test set. Otherwise we're blind
men describing an elephant.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-08-05 17:33:19 Re: Update Query doesn't affect all records
Previous Message Michael Gould 2009-08-05 16:47:16 LDAP using Active Directory