Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klDW5-0002Yf-En for pgsql-general@arkaria.postgresql.org; Fri, 04 Dec 2020 16:01:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1klDW4-0000sn-7g for pgsql-general@arkaria.postgresql.org; Fri, 04 Dec 2020 16:01:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klDW3-0000sW-EZ for pgsql-general@lists.postgresql.org; Fri, 04 Dec 2020 16:01:04 +0000 Received: from forward5-smtp.messagingengine.com ([66.111.4.239]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klDW0-0000Im-7l for pgsql-general@lists.postgresql.org; Fri, 04 Dec 2020 16:01:02 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailforward.nyi.internal (Postfix) with ESMTP id C25A81943FA5; Fri, 4 Dec 2020 11:00:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 04 Dec 2020 11:00:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3pskpB8oHa7exOT8f3ZcIeyr06TylP3fHkGOqzpNr uE=; b=OeEMzG/ODohMJmT9uK2hbFe0tqiJCUOjPvCeIbVcxsHmSe4MKYjHC5L7y 4OCc0+ac963UtqFFpy62JDnAfrHyvvyP6PIwqvsvUop/tIGy/8vN71CmujyS6PTE 02mHsRB3bz7xYXD7JaPcN4GAHJATXpca5lV3kVusopj0KU5yD48quDqkRSyztISh 6bhC/Ih1d02VOSkgbI5Yx11FwRWzPyXXX5toYwaJq8u4iWuq5AceNvg05tzBcCRO oZOj82U0xrePq0WUhvWHxiCvmdq9/djjE099owG3i8+Y9eDUcIBcdFwxfFFu4jzk IhlOmcfcf3yzKMZPLnhwlmRO5S94w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeikedgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehheeijefgvefhvdeh leekueevhfehhedvheetgffhteefgeeggfevjeejfffgvdenucfkphepkeejrddujeejrd ejvddrudegvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtoh hm X-ME-Proxy: Received: from april.pezone.net (p57b1488e.dip0.t-ipconnect.de [87.177.72.142]) by mail.messagingengine.com (Postfix) with ESMTPA id 71E0F108006C; Fri, 4 Dec 2020 11:00:56 -0500 (EST) Subject: Re: Set COLLATE on a session level To: Dirk Mika , "pgsql-general@lists.postgresql.org" References: <0DDE56FB-89A8-4621-BF5E-8CE3461F4983@mikatiming.de> From: Peter Eisentraut Organization: EnterpriseDB Message-ID: <98a8cdc2-ed4b-616c-7370-3d5e5ccb8f91@enterprisedb.com> Date: Fri, 4 Dec 2020 17:00:54 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0DDE56FB-89A8-4621-BF5E-8CE3461F4983@mikatiming.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.