PostgreSQL – Storing Unicode Characters is Easy

One of the interesting features of PostgreSQL database is the ability to handle Unicode characters. In SQL Server, to store non-English characters, we need to use NVARCHAR or NCAHR data type. In PostgreSQL, the varchar data type itself will store both English and non-English characters.

PostgreSQL SQL.

Let us explore this with the following example. Create a table in PostgreSQL database as shown below

CREATE TABLE TESTING1(COL VARCHAR(100))
INSERT INTO TESTING1 (COL)
SELECT 'ЯНВАРЬ'

The above example adds a string of Russian characters (It means January in English)

Now let us SELECT the column value and see what it returns

SELECT COL FROM TESTING1

The result is

PostgreSQL Unicode Characters.

As you see, with just varchar data type, the PostgreSQL engine is able to store multi-language characters without any additional approaches

Also, read this post to know how to add multi-language characters in the SQL Server Engine SQL SERVER – Storing Data in Hindi, Chinese, Gujarati, and Tamil (or any other) Language in the Same Table

Let me know if any other Database Engine has this type of feature, I will be happy to learn from you and post on this blog with due credit to you.

Here are few of the blog post I wrote earlier about PostgreSQL.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

PostgreSQL, SQL Function, SQL String, Unicode
Previous Post
SQL SERVER – New Parallel Operation Cannot be Started Due to Too Many Parallel Operations Executing at this Time
Next Post
SQL SERVER – Windows Authentication or System Admin Account (SA)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.