pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Björn Lundin <b.f.lundin@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: Order by and timestamp
Date: Sun, 15 Mar 2020 17:37:07 -0700
Message-ID: <c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.com> (raw)
In-Reply-To: <63004F55-4CA3-40F8-A898-E7A646B0EBD3@gmail.com>
References: <63004F55-4CA3-40F8-A898-E7A646B0EBD3@gmail.com>

On 3/15/20 2:33 PM, Björn Lundin wrote:
> Hi!
> I have an old database that behaves a bit strange.
> I keeps horse races in UK/IE.
> I have a program that continuously* adds record into a market table ,
> described as below.
> 
> *continuously means ’after each race’ which is ca 12:00 --> 23:00.
> 
> I then did ’select * from AMARKETS order by STARTTS’

Is amarkets in more then one schema?

If so what is search_path?

I could not replicate the below.

What does below show?:

select '2016-09-30 13:00:00'::timestamp at time zone 'UTC';

select '2016-10-01 15:35:00'::timestamp at time zone 'UTC';



> 
> And to my surprise i get a result like this  (note the order of column 
> STARTTS)
> 
>    marketid   |        marketname        |       startts       | eventid
> ….
> ….
> 

>   1.127275701 | To Be Placed             | 2016-10-01 14:25:00 | 27953172 |
>   1.127275705 | 1m Grp1                  | 2016-10-01 15:00:00 | 27953172 |
>   1.127275708 | To Be Placed             | 2016-10-01 15:00:00 | 27953172 |
>   1.127275715 | To Be Placed             | 2016-10-01 15:35:00 | 27953172 |
>   1.127275722 | To Be Placed             | 2016-10-01 16:10:00 | 27953172 |
>   1.127278857 | 7f Hcap                  | 2016-09-30 13:00:00 | 27953255 |
>   1.127278858 | To Be Placed             | 2016-09-30 13:00:00 | 27953255 |
>   1.127278862 | 1m Class Stks            | 2016-09-30 13:35:00 | 27953255 |
>   1.127278863 | To Be Placed             | 2016-09-30 13:35:00 | 27953255 |
>   1.127278867 | 6f Hcap                  | 2016-09-30 14:10:00 | 27953255 |
> …
> ….

> 
> 
> regards
> --
> Björn Lundin
> b.f.lundin@gmail.com <mailto:b.f.lundin@gmail.com>
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (24+ messages)  latest in thread

Message-ID: <c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.com>
Permalink:  ../c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.com/
Also on:    postgresql.org/message-id/c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.com

 · 

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 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-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, b.f.lundin@gmail.com
  Subject: Re: Order by and timestamp
  In-Reply-To: <c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.com>
  References: <63004F55-4CA3-40F8-A898-E7A646B0EBD3@gmail.com> <c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.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