pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Byron Nikolaidis <byron.nikolaidis@home.com>
To: jeam@themail.com
To: pgsql-interfaces@postgresql.org
Subject: Re: Inverted result set, why?
Date: Thu, 29 Jun 2000 22:14:39 -0400
Message-ID: <003901bfe238$f2603320$6401a8c0@byron> (raw)
References: <200006271130.GAA01884@eperke.themail.com>

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@themail.com>
To: <pgsql-interfaces@postgresql.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
>
>
>




view thread (4+ messages)  latest in thread

Message-ID: <003901bfe238$f2603320$6401a8c0@byron>
Permalink:  ../003901bfe238$f2603320$6401a8c0@byron/
Also on:    postgresql.org/message-id/003901bfe238$f2603320$6401a8c0@byron

 · 

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-interfaces@postgresql.org
  Cc: byron.nikolaidis@home.com, jeam@themail.com
  Subject: Re: Inverted result set, why?
  In-Reply-To: <003901bfe238$f2603320$6401a8c0@byron>

* 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