One of the fields while creating the table is described as below
id text COLLATE pg_catalog."default"
Often the default collation is set by initdb when the PostgreSQL cluster is first created. The collation and other locale components can be set using defaults from the operating system environment, and then inherited by databases created later.
The PostgreSQL Catalog. PostgreSQL stores the metadata information about the database and cluster in the schema 'pg_catalog'. This information is partially used by PostgreSQL itself to keep track of things itself, but it also is presented so external people / processes can understand the inside of the databases too.
Collation is used to sort strings (text), for example by alphabetic order, whether or not case matters, how to deal with letters that have accents etc. COLLATE "C" tells the database not to use collation at all. One might use this if they were designing a database to hold data in different languages.
You cannot to change these values for already created databases. In this moment, when there are not other databases, the most easy solution is a) stop database, b) delete data directory, c) run manually initdb with options --encoding and --locale (run this command under postgres user).
It's just telling that you're using default lc_collate
for this column.
But what's the default collate? Use SHOW
to discover that.
SHOW lc_collate;
PostgreSQL allows to create columns with different types of collation:
CREATE TABLE collate_test
(
default_collate text, --Default collation
custom_collate text COLLATE pg_catalog."C" --Custom collation
);
Did you see the difference?
More info about collation is on docs:
The collation feature allows specifying the sort order and character classification (...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With