V
V
Vladimir Golub2018-04-23 20:46:26
MySQL
Vladimir Golub, 2018-04-23 20:46:26

How to rewrite this line when porting from MySQL to PostgreSQL?

There is a string to define an attribute in MySQL

`STEM` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

How to rewrite it for PostgreSQL?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-04-23
@RazerVG

In postgresql, all text types follow the base encoding. case insensitive utf8 is not provided in pg.
Therefore, if you have a base in utf8 - then "STEM" varchar(50) not null
If the base is not in utf8 - do not do this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question