Remove unneeded pg_catalog schema name

This commit is contained in:
Javier Goizueta
2016-04-25 16:30:58 +02:00
parent 65415bb335
commit 11ad45306f
3 changed files with 9 additions and 9 deletions

View File

@@ -3,12 +3,12 @@ CREATE OR REPLACE FUNCTION CDB_ColumnType(REGCLASS, TEXT)
RETURNS information_schema.character_data
AS $$
SELECT
pg_catalog.format_type(a.atttypid, NULL)::information_schema.character_data data_type
format_type(a.atttypid, NULL)::information_schema.character_data data_type
FROM pg_class c
LEFT JOIN pg_catalog.pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
WHERE c.oid = $1::oid
AND a.attname = $2
AND a.attstattarget = -1;
AND a.attstattarget < 0; -- exclude system columns
$$ LANGUAGE SQL;
-- This is to migrate from pre-0.2.0 version