Re: Set COLLATE on a session level

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Dirk Mika <Dirk(dot)Mika(at)mikatiming(dot)de>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Set COLLATE on a session level
Date: 2020-12-04 16:00:54
Message-ID: 98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2020-11-20 08:13, Dirk Mika wrote:
> we come from the Oracle world and we have an application that, depending on a setting, sends the command ALTER SESSION SET NLS_SORT=... when connecting to the database.
>
> Is there a similar way to set a COLLATE for a session in PostgreSQL?
>
> I know that I can specify a COLLATE for a SELECT statement in the ORDER BY Clause, but then I would have to adjust the statements in the client and statements that are automatically generated by the database components used, would not be affected.

There is a SET COLLATION command in the SQL standard that does this.
Someone just has to implement it. It wouldn't be terribly difficult, I
think.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2020-12-04 16:03:34 Re: Accessing Postgres Server and database from other Machine
Previous Message Adrian Klaver 2020-12-04 15:13:24 Re: Accessing Postgres Server and database from other Machine