I'm trying to retrieve some table's structures with the column default values using this query :
SELECT column_name, is_nullable, character_maximum_length, udt_name, default_value
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'USER'
ORDER BY ordinal_position
But I'm unable to find the correct value to select the default values. I tried "default_value" but it doesn't work...
USER- that is a bad idea asuseris a keyword and the name of a built-in function as well.