Main Question
I was wondering what the difference between declaring a type using double semicolon :: is, vs not using :: in Postgres.
Example
INTERVAL '1 day'
-- vs
'1 day'::INTERVAL
So Many More Questions...
Is
::type casting? Like casting a string to anINTERVAL.What would you call the first example without using
::, or is that how you define that data type without casting?Are there any benefits to use one over the other?
Was one introduced before the other?
Are there speed benefits?
Is one method standardized and prefered over the other within the community?
Is there a community style guidelines document?
Is this unique to Postgres, or applicable to SQL as well?
Sorry for all the questions!