pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Dirk Mika <Dirk.Mika@mikatiming.de>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Set COLLATE on a session level
Date: Fri, 4 Dec 2020 17:00:54 +0100
Message-ID: <98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.com> (raw)
In-Reply-To: <0DDE56FB-89A8-4621-BF5E-8CE3461F4983@mikatiming.de>
References: <0DDE56FB-89A8-4621-BF5E-8CE3461F4983@mikatiming.de>

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.





view thread (16+ messages)  latest in thread

Message-ID: <98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.com>
Permalink:  ../98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.com/
Also on:    postgresql.org/message-id/98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.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: peter.eisentraut@enterprisedb.com, Dirk.Mika@mikatiming.de
  Subject: Re: Set COLLATE on a session level
  In-Reply-To: <98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.com>
  References: <0DDE56FB-89A8-4621-BF5E-8CE3461F4983@mikatiming.de> <98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.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