Search Postgresql Archives

Re: Order by and timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx <mailto:b.f.lundin@xxxxxxxxx>





--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux