Re: Running Totals and other stuff....

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Levan, Jerry" <Jerry(dot)Levan(at)EKU(dot)EDU>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Running Totals and other stuff....
Date: 2004-06-01 14:04:13
Message-ID: 40BC8CDD.5090703@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Levan, Jerry wrote:
> Humpfff...Last night I tried posting this and found that
> dynamic IP's are now prevented from posting to the list...
>
> Did I miss the announcement?

Sounds odd - or do you mean your mailserver has a dynamic IP?

> I get the right results, but this relies on the fact the oids in the
> check table are currently *sorted* (when the table is sorted by thedate)
> at least it appears that way via
> a very brief inspection.... I suspect if I deleted a record and added
> a record the oids would get out of sequence.
>
> Is there a slick way to tell if a column (say the oids column) is in "sorted"
> order when the table is sorted by date?

No, and it isn't recommended that you use the oid column.

> Assuming the oids get out of wack with respect to the date, is it possible
> to easily construct a table of the checks sorted by date and then "glue on"
> a column of ascending integers so the running total sql statement will
> function properly?

What is your key?
Why not just sort by cheque_date, <key>?

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-06-01 14:16:27 Re: after using pg_resetxlog, db lost
Previous Message Richard Huxton 2004-06-01 14:00:03 Re: Large table search question[Scanned]