I have seen ::
in variety of places involving postgres code I have seen on the net. For example:
SELECT '{apple,cherry apple, avocado}'::text[];
It seems to be some sort of cast. What exactly is ::
in postgres and when should it be used?
I tried a bit of googling and searched the Postgres docs for ::
but got no good results.
I tried following searches in Google:
- postgres double colon
- postgres ::
- ::
I tried the following searches in the postgres docs search button
- double colon
- double colon cast
- ::
This was almost embarrassing to ask on SO, but I figured Google will hopefully see this answer for other people in the future.