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 1kg4do-0007Qj-E8 for pgsql-general@arkaria.postgresql.org; Fri, 20 Nov 2020 11:31:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kg4dn-00080L-CV for pgsql-general@arkaria.postgresql.org; Fri, 20 Nov 2020 11:31:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kg4dn-00080D-0J for pgsql-general@lists.postgresql.org; Fri, 20 Nov 2020 11:31:47 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kg4dk-00041x-7R for pgsql-general@lists.postgresql.org; Fri, 20 Nov 2020 11:31:46 +0000 Received: by mail-wm1-x331.google.com with SMTP id 1so9510626wme.3 for ; Fri, 20 Nov 2020 03:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=WDA5nPp6lbFDAg+DdreKLZf+rc+tig+LqYpAYpUIl4Y=; b=aKRaTTKNWssOntwKfnNGLnQ3xdQ+cUzunTHBO7GVV0n2k8NEmJL1c96qEq5uMYl25D UfYulGdwCrNf6p7HM8edrlz2azlL71oN8cf4ekqFxg0wCgfSezzKW9EwDLJW8GBp0vef G/HMFuHqN+WL4/6i2McmvvQW4QbHTXD7FjdNkzQODHRvLe7+DTLr0lFcO/q1llhKQea1 zuZFkwS17RPEBz7JzbZnwL5EjHxAviA0RhieqczZ0RNTePk1jgg6Cf08Pm/3z2VmAi6g qJCSYXxIZeuuJdQFw8K0Ho3IqSM34dpYVpb+RJi9z4RTjWrEifLSun4WpL4YlQK1MI2J 21Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=WDA5nPp6lbFDAg+DdreKLZf+rc+tig+LqYpAYpUIl4Y=; b=oyR1ZRmDw4oeUkncjECe9qfSEYOkwLniDEpy/Qbyw/bjNoJYvnfzekXuMvL3v+Nnuv ppcUE7C75SpQimlXjSkptDMWx7NdJwu0Uea+wnQ139Kr0THyn2ojv8kgiW9GLYhERqwq zRWGMhbt4b+d6SXx02Zyll1bJ5sYps4aNgo5+pp0ng8CHRA8iDJc2149xAhzvmQDfmPx opgA0uM/I1x90zvI1hSQBbzC6+IYB4eZ2VxTgw2x/y/Kn4Fi9ULQ/ugMHT+2xTForpOq jOi73JR/qtg5ZJWcgGam5zXvsSjBPWI1oDx2jQX3viaDmV+a+v1VHrtHyhD2yKRF55gc 2Ckg== X-Gm-Message-State: AOAM5311KbeYqQw5jT4MAbGyHkCOuBCrJkLxNLcL8nLgtzlm4FEcJUqA R69Ak9S2a8eNLf90d8Q1WlYUZw== X-Google-Smtp-Source: ABdhPJxydil8owZ4aNQvFBcJ4TXnUyCDsBqbZXrXNcKY7jQrwyc9McgnZrTWPOIye2Euru+GfK6WXQ== X-Received: by 2002:a1c:96cb:: with SMTP id y194mr9088233wmd.62.1605871903372; Fri, 20 Nov 2020 03:31:43 -0800 (PST) Received: from localhost.localdomain (91-115-148-169.adsl.highway.telekom.at. [91.115.148.169]) by smtp.gmail.com with ESMTPSA id s4sm4734823wro.10.2020.11.20.03.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 03:31:42 -0800 (PST) Message-ID: <9fd0eef06639e633e258461e5baad9734bcbc1ba.camel@cybertec.at> Subject: Re: Set COLLATE on a session level From: Laurenz Albe To: Dirk Mika , "pgsql-general@lists.postgresql.org" Date: Fri, 20 Nov 2020 12:31:42 +0100 In-Reply-To: <0DDE56FB-89A8-4621-BF5E-8CE3461F4983@mikatiming.de> References: <0DDE56FB-89A8-4621-BF5E-8CE3461F4983@mikatiming.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 2020-11-20 at 07:13 +0000, 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 no way to do that in PostgreSQL. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com