Re: Order by and timestamp

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Steven Lembark <lembark(at)wrkhors(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Order by and timestamp
Date: 2020-03-16 00:32:18
Message-ID: 5241403b-1305-a80d-9389-34590445417e@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/15/20 2:48 PM, Steven Lembark wrote:
> On Sun, 15 Mar 2020 22:33:35 +0100:wq
> Björn Lundin <b(dot)f(dot)lundin(at)gmail(dot)com> wrote:
>
>> And to my surprise i get a result like this (note the order of
>> column STARTTS)
>
> (1) Suggest using "pastebin.com" for this kind of data. It may not
> look very pretty -- or readable at all -- on the viewer's end
> depending on their settings (see below for example).
>
> (2) I think you are refering to one section where the date goes
> from 2016-10-01 to 2016-09-30; suggest describing the
> transition in your text and flag the rows with '*' or
> something similar.
>
> | 2016-10-01 15:35:00 |
> | 2016-10-01 16:10:00 |
> * | 2016-09-30 13:00:00 |
> * | 2016-09-30 13:00:00 |
>
> (3) "Old database" might mean anyting. Provide the PG version
> it was created in and the one you are using along with the
> result of "\d+" in the current database.

That was at the bottom of the post. Version 9.6.10 and a \d for amarkets.

>
> (4) Classic causes of this are a botched index. Depending on the
> size you might just want to either drop and re-add the
> indexes or export and reload the table (e.g., \copy to ...
> + truncate + \copy from ...). The point there would be
> fully rebuilding the table and index structure.
>
> If that doesn't work perhaps drop and re-add the table with
> whatever version of PG you are using and then \copy the data
> back in using the current version.
>
> (5) If you've tried any of the above then bloody well describe it
> (along with any migration steps taken) in the message so you
> don't have to re-read what you've already done :-)
>
> (6) Don't gamble on horses, play the stock market instead: It
> sounds fancier and you can loose much more money much more
> quickly... er... yeah.
>
>
> What this looks like on my end. Feel free to try and make sense
> of it yourself.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-03-16 00:37:07 Re: Order by and timestamp
Previous Message Tom Lane 2020-03-16 00:11:18 Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536