Skip site navigation (1) Skip section navigation (2)

Re: Inverted result set, why?

From: "Byron Nikolaidis" <byron(dot)nikolaidis(at)home(dot)com>
To: <jeam(at)themail(dot)com>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Inverted result set, why?
Date: 2000-06-30 02:14:39
Message-ID: 003901bfe238$f2603320$6401a8c0@byron (view raw or flat)
Thread:
Lists: pgsql-interfaces
If you want a specific order based on the time, you could add a timestamp
field to the table that would default to the current time when the record
was inserted (see create table...default...) .  Then you can "order by" on
the timestamp, either ascending or descending if desired.

Byron

----- Original Message -----
From: <jeam(at)themail(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Sent: Tuesday, June 27, 2000 7:30 AM
Subject: [INTERFACES] Inverted result set, why?


>
> Hi there,
>
> Using the psql utility I insert three records into a 6.5.3 postgresql
table with or without indexes. I SELECT * and the records are retrieved in
the order I inserted them, and that's correct.
>
> However, if I SELECT the records from a Delphi 5 application, using the
BDE and the latest ODBC driver, the result set is inverted, i.e., on the
same index key, the last record I inserted is listed first and so on.
>
> This forces me to use an index even for tables I don't need one. Or worse
yet, I need to create a second, auxiliary field on the table and add it to
the index when I have one in order to get the proper order of the inserted
records.
>
> I don't know if I should blame Borland's BDE or the ODBC driver.
>
> Any clues about this problem?
>
> Thanks in advance,
>
> Jorge.
> __________________________________________________________________
> Make A Buck Or Two @ TheMail.com - Free Internet Email
> Sign-up today at http://www.themail.com/ref.htm?ref=908313
>
>
>


In response to

Responses

pgsql-interfaces by date

Next:From: philDate: 2000-06-30 02:35:08
Subject: Re: Inverted result set, why?
Previous:From: Mark DzmuraDate: 2000-06-29 23:42:49
Subject: psql comment char??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group