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 1pOpov-0001IF-W3 for pgsql-general@arkaria.postgresql.org; Mon, 06 Feb 2023 00:57:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pOpou-0000uK-UC for pgsql-general@arkaria.postgresql.org; Mon, 06 Feb 2023 00:57:20 +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 1pOpou-0000uB-HO for pgsql-general@lists.postgresql.org; Mon, 06 Feb 2023 00:57:20 +0000 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pOpoq-0001hX-M9 for pgsql-general@lists.postgresql.org; Mon, 06 Feb 2023 00:57:20 +0000 Received: by mail-oi1-x22b.google.com with SMTP id r28so8569104oiw.3 for ; Sun, 05 Feb 2023 16:57:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7S40reALnqHOcnUdwW10pz+ci29J/CZtS0HlMjayCoY=; b=XqrZySHXGIw8+HR0gZdMkyy2r2Dgy6JjgE71pM68MXWc1DrfITS49vZwpXl6e8Er7x JlaAyQfnRURwC4mYHvQw3nXCxbn0O0dUokRnvamBaYr65t2SJytjIej2ds4pWdJH5vSz q+i0EIy+PM5HoGw9bRMxlgAhFzkIvHryDpvPc04K/visoVieNc8ACcAnBV0Dh7wFrHtS avP7GHc6eHUxITMl53m3YmGXy3n17BBfgTfjRNT+0VX7tv0SM4Rfkf2kBJvory9VXgK1 lSGFiewv6AdMwzaHTA/aVDlo2kTF4YJDqXkwBPbXZoTCrW581JdJenRqd2w0NX42wCDC LtQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7S40reALnqHOcnUdwW10pz+ci29J/CZtS0HlMjayCoY=; b=1n2Xksr0VV8WVebwQhss8PiwRRgdykW/R/xTu+/vqta9WwbraWiwZDyYDcpxS79Eqr bGE+UbWwQq6n1xJi8GEeoKeIGB2QwfnKqM9WiO/TavWVuluJlDvp3UnzPULISnD6+eED UIiz3lv8bN44sSXk6LqIe/b3J38cugSY0rq5O8VuhEdQaOUZod5TR58zj91IhT3GpdeF aoFgMAFpTajQs4tnWNvvF1WEAVgosM/T8HcbA0xgFUP2tTor2dx6Y1lymYrweTS80TOl hJzO+1Oyb9FjXW1TgRjN9DQGoOyU1pwqJYh/79DspNix6LJ7+F2ezyeN2kTNjBjQbnMO 94nQ== X-Gm-Message-State: AO0yUKX5i1qfOiheQ1W/e8hrbJfaD9CbZA8jHEdPLEctv6LassTkaC2E 901ohcnyWE8K38eQSQbjpHAaImY4fFM= X-Google-Smtp-Source: AK7set///hKfyNmFDiUMtiVR+YhrBCwMxWOyDiLpiAcgIqLDKwEC+lwAN7zAfc6AjDmxdkkRQJgYPw== X-Received: by 2002:a05:6808:a:b0:364:3de2:bfd1 with SMTP id u10-20020a056808000a00b003643de2bfd1mr7609693oic.32.1675645034310; Sun, 05 Feb 2023 16:57:14 -0800 (PST) Received: from ?IPV6:2600:1700:bd2c:b810::43? ([2600:1700:bd2c:b810::43]) by smtp.googlemail.com with ESMTPSA id l24-20020a9d7358000000b0068d01839027sm4195311otk.30.2023.02.05.16.57.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Feb 2023 16:57:13 -0800 (PST) Message-ID: <8c0e7312-a30a-074a-cdb6-32923a59d72d@gmail.com> Date: Sun, 5 Feb 2023 18:57:13 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Why are you specifying the collation to be "C" when the default db encoding is UTF8, and UTF-8 has Greek, Chinese and English encodings? On 2/5/23 17:08, Dionisis Kontominas wrote: > Hello all, > >   I have a question regarding the definition of the type of a character > field in a table and more specifically about its collation and UTF-8 > characters and strings. > >   Let's say that the definition is for example as follows: > >     name character varying(8) COLLATE pg_catalog."C" NOT NULL > > and also assume that the database default encoding is UTF8 and also the > Collate and Ctype is "C"". I plan to store strings of various languages in > this field. > > Are these the correct settings that I should have used on creation of > the database?. > > Thank you in Advance! > > Kindest regards, > > Dionisis Kontominas -- Born in Arizona, moved to Babylonia.