I think you need to be more specific as to what "this" means.Looking again after Andrian's comment are you trying to write, in the script file:datetime_diff('start time as string'::timestamp, 'end time as string'::timestamp, HOUR)and get PostgreSQL to recognize the value HOUR as a custom type value without single quotes surrounding itIf that is the question the answer is no. The only type literals that can be written without single quotes are numbers.The parsing of SQL can handle some standard mandated non-quoted constants but they are basically keywords, not values.David J.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных