From: Joseph Bove <jbove@vetstar.com>
To: pgsql-performance@postgresql.org
Subject: Find one record
Date: Thu, 18 Sep 2003 14:01:05 -0400
Message-ID: <5.1.0.14.2.20030918135557.03ab89d8@mail.vetstar.com> (raw)
In-Reply-To: <200309181034.13414.josh@agliodbs.com>
References: <24864010.1063897195181.JavaMail.root@statler.psp.pas.earthlink.net>
<24864010.1063897195181.JavaMail.root@statler.psp.pas.earthlink.net>
Dear list,
I hope this to be a simple question. I have need to simply read the first
row in a given table. Right now, I have some legacy code that selects all
rows in a table just to see if the first row has a certain value.
The code is seeking to see if an update has been run or not. A hypothetical
scenario would be: has an update been run to populate data into a new
column in a table. Neither the data nor any of the rows are consistently
known. So the test selects all rows, tests the first row and then ends if
the column has a value.
Does anyone have a better way to do this?
Regards
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: jbove@vetstar.com
Subject: Re: Find one record
In-Reply-To: <5.1.0.14.2.20030918135557.03ab89d8@mail.vetstar.com>
References: <24864010.1063897195181.JavaMail.root@statler.psp.pas.earthlink.net> <5.1.0.14.2.20030918135557.03ab89d8@mail.vetstar.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