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 1nsYhS-0006QI-As for pgsql-general@arkaria.postgresql.org; Sat, 21 May 2022 23:39:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nsYgR-0007Xy-AO for pgsql-general@arkaria.postgresql.org; Sat, 21 May 2022 23:38:55 +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 1nsYgQ-0007Xp-PQ for pgsql-general@lists.postgresql.org; Sat, 21 May 2022 23:38:54 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nsYgO-0001Rq-G4 for pgsql-general@lists.postgresql.org; Sat, 21 May 2022 23:38:53 +0000 Received: by mail-pf1-x435.google.com with SMTP id u15so10598367pfi.3 for ; Sat, 21 May 2022 16:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=YEqQVYqRCuGnyQ0Fb+Zcn5KYoT/GwIFNz5kFkskoRU0=; b=SbetERUTdroWwl8MFO1n3oDgVnlg0FrOxT6HuI+qQMa+7I0kfFuhc7FY1BgIonkNo7 /zkG2gkpNkpG/fU1Isw+/uQoThcAKoDpQR184cJ9wBCm/npoe+BWFhvVEuZBjDurSE/j YPOEQ9uN0cE60DgJkyRbrxmumfzkAimwRCDsCQ9pJXagxaLc9+L799KjnfDrd9Vw7SmC c/Zr3jPMvis6FW2ulGE4DXFO2hcGHzYumzD9x1aznN9jKLSEKtu6tNmyYfKi3oiEOKgm ncg0bT5KY9y713KBcsL/alTkf0RCkRgRghp1kmUjKratGYn9rKQmFGTD3fYK/Hk7oGxa U3jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=YEqQVYqRCuGnyQ0Fb+Zcn5KYoT/GwIFNz5kFkskoRU0=; b=4Im5+lS1M5e6RDGGvOzZthrhDuu8EHHTuemp5D/+tJuofxEUIADlfoC9Wvqv55/fTW 4dcokXievxzMUsl1sLYMS6lx8uq2wbfTNOkyxmXXtBWx7quEQXSVyMwL8wowFqFnTqoZ Kip0M0jkE9yVB/XtRxXvZe9Z4anVe7nUBI0y99skG7QTSZDAWkCeYrdxmW0Xi/bayg88 pN+olkQ/oR06Rl+njF23uJAq2rcJstE6TVxXWctg+9ld81OhAvu2DYZOnltZ2k4naYPr t53EaRb1/yWVpCEzOiV4xi7OjDCeh5ADdFst4w1TdDbcOr/J494DlbBP7efgvN2F1nBf QLHA== X-Gm-Message-State: AOAM531m8WVsmzF21rKdIZz150mB8WN5UllsscRtatwFq+VX8jBiqySM lRHjEEfttb2BfYnYuuMdLM09YBtHgPw= X-Google-Smtp-Source: ABdhPJzTPhTMsWQof1F/c73SJVHSRc3KS2OP1lsSoPBofnpOjXL3341idiXZlYSV5gUcp3LsGvEsCw== X-Received: by 2002:a65:6b8e:0:b0:39d:6761:300f with SMTP id d14-20020a656b8e000000b0039d6761300fmr14735198pgw.42.1653176330709; Sat, 21 May 2022 16:38:50 -0700 (PDT) Received: from smtpclient.apple ([132.147.78.35]) by smtp.gmail.com with ESMTPSA id z10-20020a170903018a00b0015edc07dcf3sm2172612plg.21.2022.05.21.16.38.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 May 2022 16:38:50 -0700 (PDT) From: Kip Cole Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Casting a collation in an ORDER BY ... COLLATE Message-Id: Date: Sun, 22 May 2022 07:38:45 +0800 To: pgsql-general@lists.postgresql.org X-Mailer: Apple Mail (2.3696.80.82.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I=E2=80=99m trying to cast a string value to a collation name without = success. My suspicion is this isn=E2=80=99t possible based upon the error message. But perhaps wiser heads than mine have a = suggestion on how to do this? cldr_sql=3D# select * from models order by name collate = 'en-x-icu'::regcollation; ERROR: syntax error at or near "'en-x-icu'" LINE 1: select * from models order by name collate 'en-x-icu'::regco=E2=80= =A6 Utilmately the objective is to interpolate the collation value into a = prepared query so this is just the first step to validate that casting a COLLATE name is = possible or not. Suggestions and ideas most welcome.