A
A
Anton Artyomov2017-09-22 08:34:39
PostgreSQL
Anton Artyomov, 2017-09-22 08:34:39

Why SELECT (24576 & 8192) = 8192; gives an error message?

Hello. PostgreSQL 9.6
SELECT (24576‬ & 8192) = 8192;
issues

ERROR:  syntax error at or near "‬"
LINE 1: SELECT (24576‬ & 8192) = 8192;
                     ^

Or for example
SELECT 768‬::bit(8);
Gives
ERROR:  syntax error at or near "::"
LINE 1: SELECT 768‬::bit(8);
                   ^

What is wrong?
UPD: I don’t know how to delete the question, but the reason is that after 24576 and after 768 there was simply some kind of invisible character

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kuznetsov, 2017-09-22
@DarkRaven

Looks like a type mismatch.
This is how it works great:
UPD. You can look here, for example: https://stackoverflow.com/questions/14200486/match...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question