Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wK0N4-000UFz-1s for pgsql-general@arkaria.postgresql.org; Mon, 04 May 2026 20:58:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wK0N3-008xcq-0Z for pgsql-general@arkaria.postgresql.org; Mon, 04 May 2026 20:58:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wK0N2-008xci-2d for pgsql-general@lists.postgresql.org; Mon, 04 May 2026 20:58:28 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wK0N0-00000000Vlo-3ESU for pgsql-general@lists.postgresql.org; Mon, 04 May 2026 20:58:28 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-7982c3b7da9so41893597b3.1 for ; Mon, 04 May 2026 13:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777928304; cv=none; d=google.com; s=arc-20240605; b=F0GlX45YMaz+oKYV8fz0tyvv2kypXc6e0z6BdzFwjIVgEFTL7v7nfpXPxbFSTnad/Z yRum9Yoh17EDTnFbaxOWR9TNNwk32Nky7Ta+zbCmzbJtmDLE2LBCabqZYQiAxwMKUNLt FkuTU8kPwXfvdiRgenQDPQOkBjfkyTkpVlnIukhok0eXdem72C86VfPoQXeNGtYdB2jH PxaTIcHspq00olwG2aUGL/RmJE+X/WcPgdnhQm/cYUCczN7abL9H8MheukuSlaEd8UkW kTztj0AhmSUfj9cFUMio6SQZmg3IozimY/nj8kWvIJrj3cTe14gOAIPeldkrn57OexyT lR8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LLAgFAXTEjKUhpH9dZWd78Ie02UojdOEuF++0xjvjfY=; fh=q9c6o7SlrCRqCi8uj3X2XfdAtCboKNf1t+Ax0rAA5kQ=; b=cZ271YgbBGfPKlhuNPZUgcjBbH5615VAE5UVQI9tMnIpW0oKfT+M7rJEBvR7KcjuWm FdQit8ZCXpfgsuchGOpxXHRXflhVNaVGp8PejN8BD+p4BCRcDg2pwQXq9UOUDDPhBgci hNk99tuKvqmuz9HKd+qG5HYCIiQGiM7aRcqObwpZKmv3sanljaCC5rrCGAHafL8MIU2m pnySU29wC256NIYbtab7wzVwTXT+AzlC0NuNuWofzGwgKQzUbjysgcUi/IBC4GCIP5mn iF5UqWUTfN2e/99j1tWZjFVQF6LmkiuGACvYZVtW9JbKlTSO6wzxJvDFMIh/DGLYV6Pj Iwcw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777928304; x=1778533104; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LLAgFAXTEjKUhpH9dZWd78Ie02UojdOEuF++0xjvjfY=; b=W8HjOTI2Z5vyJ2fAXqsvPNxyARQKwBrLmJ1swGztQN5WMaTSXFch1JenEiI3GWez9S pOXzJbXBU/NI4n6ccs/8+8DnOn7cKY2BHjDDDPOOB1AxTtg+bO4fu935TZr/SojNfZLk wYHLIg0QBXawgegXh8/vVwokUIZOFcOmX8j41LVj94IYg0dT1MM+caQ0QZoCtx1hNcZl rd6vrpTt6DGMVBfgv2HlsW8wvvsp872uR86MqkSQ7z34qGXgD2HWNlvnPFzj6AJqHrdf R1/B1QmoO9zhdHcfRqKPi66BG5+NDMeq/dVoIbtCCSzqQCWs52w4QZC7dVukVo0p2W9F cxEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777928304; x=1778533104; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LLAgFAXTEjKUhpH9dZWd78Ie02UojdOEuF++0xjvjfY=; b=BOOgp2t1K/JDk+iVl0IGy9zS+x6bhl+783ZgkKZd6XqZV1EJirrlwsuBvKGg4cHDle TAASHVYBop1lpFLcR2CPUhAy8LoWfmT96r7zkCmWtjHHFbPenrWDVdyk+VHmRbDzkEuv rcn92D4P1QuNbWeRUgUHdqgALlDY20mHRRQhZU5OBIUAJ77t7aRKJn0h1ncRgRXnCFWS tnVgWEMm+9sIJeJx47SxSJo2+lLvDCdS17UMRwxWqaYctd9M8PwfB6Boaqe4BvLp27Xo u8gToc7eDeF9Y5zd9wjK4rROnmXW/L8BifypqRdu/9nmzvpJz8FTcBttBZyU5rvSFieN 4lHg== X-Forwarded-Encrypted: i=1; AFNElJ9tcs3b12/ln6M65Bt1zVEitWKhVL0VrIN3DnOOzqd//U2N5pP17N+5cO+MRle2417juCT6yrPYu9KzbWCL@lists.postgresql.org X-Gm-Message-State: AOJu0YyGcgX3FfWR121/o2kEpUdRZ9gW785hfWuTgnrBuTQuwsPhvHE0 agzHIQELez75cGAjVvicB8xj9msvx92ruSRl57hrmXs3DRd6KKQs/4i/FQ+f46P3UsgizLCLNcq jWu436r8ZDJXgRmHg8qpwbsZ6NiD/rDM= X-Gm-Gg: AeBDietYNQ/eb9zCvPvvQtyhLpApxWrfmL7BNDc5g7cFz3dUDSlUyC0bjMGND0qdalU cI6XKGUB1tXlKjd/QXRI7hxnZeo5ogg0eT05G3dx0hZ1863m8NG8MctZE71ZKMThCycUS/kqVFa q65e6sd7EeyKrHTFCwyrJlzTgf+09Ij3lWDfuzGNQSlkLUQXWz0AmYCD52Yl5aRMvFmyUcNiMpn yal0BA7pNnJakrmUSQp/IfCeSoA2d0DA9iS8GSoYpF3bhW6A37TgeWE3jLKG3zP8YI8sReklidh HOIAaPikTN2NT/zZjehPTi/GKFzd/szhB8gS2gGUxaW80aRGG5UWPs0fNF2sAm8ezFm2BQkatbp BkvKsnQ== X-Received: by 2002:a05:690c:102:b0:79e:766d:81df with SMTP id 00721157ae682-7bd77118635mr117778197b3.33.1777928304219; Mon, 04 May 2026 13:58:24 -0700 (PDT) MIME-Version: 1.0 References: <0249361D-3CAC-41DF-9024-E154E8B02909@gmail.com> In-Reply-To: <0249361D-3CAC-41DF-9024-E154E8B02909@gmail.com> From: Igor Korot Date: Mon, 4 May 2026 13:58:12 -0700 X-Gm-Features: AVHnY4Lov1a4eIOXID3A9u9kCKBAVBQikC9BJtqJH3YmvGF0w8SszrJgHQmCWs0 Message-ID: Subject: Re: Choosing default collation/ctype To: Rob Sargent Cc: Ron Johnson , "pgsql-generallists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Rob, On Sun, May 3, 2026 at 9:16=E2=80=AFPM Rob Sargent = wrote: > > > > > On May 3, 2026, at 3:51=E2=80=AFPM, Igor Korot wro= te: > > > > =EF=BB=BF > >> > >> > >> Then choose UTF8. > > > > Let me give you a quick run of what I'm trying to do: > > > > In my code I have 3 combo boxes: encoding, collation and ctype. > > > > Initially they all have a value of "Default". > > > > Lets say a user selected "KOI8-R" as an emcoding. > > > > What I will do is populate collation and ctype combo boxes with > > values available for such encodings. > > But I want to go a little further and change the values in those > > to be the default collation/ctype for the "KOI8-R" encoding. > > > > Now are you saying I should choose the one that have "UTF8" > > in it? > > > > Thank you. > > > >> > > What is your user trying to do? Create a database? Yes - create a new DB. > And you are asking for server side settings to use when you invoke a crea= te database command on the user=E2=80=99s behalf? "CREATE DATABASE" command have an options to set encoding/collation/ctype. I thought that if they are used - or at least encoding - it defines a server side encoding and then the client will perform the conversion based on conversion function or the type of the client commecting ODBC/libpq/psql/etc. Or maybe both. Am I wrong here? Also it is possible to supply only the encoding, in which case server should choose some default values for collation/ctype for the newly created DB. And if I provide those in my UI instead of saying "Default" and let the user choose if they are not satisfied it would be great. Leaving it as "Default" is an option but it is weird. > And they will understand all the possibilities and their consequences? "CREATE DATABASE" will be done by DB Admin. From the PG POV no other user will be able to do that. And DB Admin will certainly know what they are doing. If not - they can consult the help/manual. > > Or are you asking the user which settings to use for this clientside user= ? No. > If I were this user I would be pissed off you didn=E2=80=99t make some r= easonable guess for a starting point from the current environment. Thank you. >