'test'::text. How i can cast any default column value to simple string?
Have you thought about reading the documentation? Even a VARCHAR is of type TEXT, but with a length constraint. And CHAR, VARCHAR, and TEXT are all strings.
How this is related to my question? I want some convinient way to make this SELECT substring(column_default, 2, length(column_default) - 8) FROM information_schema.columns WHERE (table_schema, table_name) = ('public', 'test') and column_name = 'test'
Обсуждают сегодня