About postgresql :::bpchar に

Asked 2 years ago, Updated 2 years ago, 55 views

Hello, let me ask you a question.
I am re-pasting the index of a table.

"table_name_login_idx" btree(login) WHERE sex='m':bpchar

What does this :bpchar mean?
Sex is character(1).

Please give me guidance.

postgresql

2022-09-30 14:25

1 Answers

In PostgreSQL, two colons : represent the cast of the type.In other words, we cast 'm' to the bpchar type.

The bpchar type is the internal name of character(n) and text are different type

of varchar(n)

Without this type cast, the type 'm' will be interpreted as unknown, so it's probably an explicit type cast.

See also


2022-09-30 14:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.