Re: Order by and timestamp SOLVED

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Björn Lundin <b(dot)f(dot)lundin(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Order by and timestamp SOLVED
Date: 2020-03-17 15:50:25
Message-ID: 1ce5aa7c-3019-6211-294c-def8e03c0d2d@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/17/20 12:28 AM, Björn Lundin wrote:
>
>
>
>>> So insert is
>>> bnl(at)ibm2:~/db$ psql
>>> Tidtagning är på.
>>> AUTOCOMMIT off
>>> psql (9.6.15, server 9.4.15)
>>> Skriv "help" för hjälp.
>>
>> Except you are using psql 9.6.15 against a 9.4.15 server.
>>
>> What happens if you use psql(9.4.15) to do sort query against 9.4.15
>> server?
>
> So this is more than strange
>
> bnl(at)ibm2:~$ /usr/lib/postgresql/9.4/bin/psql
> Timing is on.
> AUTOCOMMIT off
> psql (9.4.15)
> Type "help" for help.
>
>
> This. works. I did not realize I ran different client/server versions.
> 9.6 must have come with a Debian upgrade where I did not migrate the
> database to 9.6,
> but got the psql 9.6 as default (/sr/bin/psql)
>
>
> However AFTER I checked the bad sorting - sep/oct 2016 and early apr 2017
> With psql 9.4 I connected with psql 9.6 again.
> And now the sorting error is  gone her too!
>
> I cannot reproduce it anymore
>
> So I learned this - always use same version of client and server

I made the suggestion to try the same psql version as the server because
I had run out of ideas. It is usually not an issue to mix and match
psql/server versions. In fact the Debian/Ubuntu packaging will by
default use the latest psql to connect to all versions installed as it
is backwards compatible. I have also gone the other way older psql/newer
server, you just lose any added features from the newer psql.

I am still not sure that this can be marked solved. I am trying to
figure out how running a different version of psql once can affect
another version of psql. That would seem to imply psql changed something
on the server and AFAIK sorting/ordering is done by the server not the
client.

>
> Many thanks to Adrian and Tom
>
>
> --
> Björn Lundin
> b(dot)f(dot)lundin(at)gmail(dot)com <mailto:b(dot)f(dot)lundin(at)gmail(dot)com>
>
>
>
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Björn Lundin 2020-03-17 15:57:19 Re: Order by and timestamp SOLVED
Previous Message AC Gomez 2020-03-17 15:23:19 Keeping Admin-Owner user but creating new user with effective Admin-Owner access rights?