Home > Software design >  What is the precedence of the `COLLATE` operator?
What is the precedence of the `COLLATE` operator?

Time:08-31

What is the precedence of the COLLATE operator? For example, in the following:

SELECT 'a' || 'B' COLLATE someting

I believe in this particular case it is interpreted as:

SELECT 'a' || ('B' COLLATE something)

But is there a listing of the exact rules on where the COLLATE keyword falls in? Is that section that says ="." rel="nofollow noreferrer">"All other operators" ?

CodePudding user response:

As so often, the PostgreSQL documentation delivers:

The COLLATE clause binds tighter than operators; parentheses can be used when necessary.

  • Related