pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gurjeet Singh <singh.gurjeet@gmail.com>
To: Nacef LABIDI <nacef.l@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: After updating dataset the record goes to the end of the dataset
Date: Tue, 22 Apr 2008 15:42:37 +0530
Message-ID: <65937bea0804220312s2e873084n4741fa8e1cc3e26b@mail.gmail.com> (raw)
In-Reply-To: <f16f7ea00804220254i671e446au7c50dca45dea10d7@mail.gmail.com>
References: <f16f7ea00804220254i671e446au7c50dca45dea10d7@mail.gmail.com>

On Tue, Apr 22, 2008 at 3:24 PM, Nacef LABIDI <nacef.l@gmail.com> wrote:

> Hi all,
>
> I am using Postgres in a Delphi application through ODBC. I am having an
> issue with updating records.
>
> When I create a dataset to get the records in a table then after I update
> one of these records and then refresh the dataset, the record goes to the
> end of the dataset. This is disappointing when editing records on a DBGrid,
> where users find their updated records jump to the end of the grid. Even
> after restarting the application, the updated record keeps showing at the
> end of the grid. I have tried the same thing with SQL Server and it works
> normally, so I thought it was a postgres behvior.
>
> Has anyone an idea about what could be the cause of such a behavior.
>

The data is not guaranteed to be ordered if you do not specify an ORDER BY
clause in your query. Try adding a meaningful ORDER BY clause, that should
solve the problem.

HTH,

Best regards,
-- 
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device

view thread (13+ messages)  latest in thread

Message-ID: <65937bea0804220312s2e873084n4741fa8e1cc3e26b@mail.gmail.com>
Permalink:  ../65937bea0804220312s2e873084n4741fa8e1cc3e26b@mail.gmail.com/
Also on:    postgresql.org/message-id/65937bea0804220312s2e873084n4741fa8e1cc3e26b@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: singh.gurjeet@gmail.com, nacef.l@gmail.com
  Subject: Re: After updating dataset the record goes to the end of the dataset
  In-Reply-To: <65937bea0804220312s2e873084n4741fa8e1cc3e26b@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox