Redshift Observatory

System Table Tracker

System view pg_catalog.svv_geography_columns version 1.0.52931 / 2023-07-07

schema name column data type
pg_catalog svv_geography_columns coord_dimension int4
pg_catalog svv_geography_columns f_geography_column varchar(128)
pg_catalog svv_geography_columns f_table_catalog varchar(128)
pg_catalog svv_geography_columns f_table_name varchar(128)
pg_catalog svv_geography_columns f_table_schema varchar(128)
pg_catalog svv_geography_columns srid int4
pg_catalog svv_geography_columns type varchar(9)

View Text

SELECT CAST(btrim(CAST(rs_cols.database_name AS text)) AS varchar(128)) AS f_table_catalog,
       CAST(btrim(CAST(rs_cols.schema_name AS text)) AS varchar(128)) AS f_table_schema,
       CAST(btrim(CAST(rs_cols.table_name AS text)) AS varchar(128)) AS f_table_name,
       CAST(btrim(CAST(rs_cols.column_name AS text)) AS varchar(128)) AS f_geography_column,
       2 AS coord_dimension,
       0 AS srid,
       'GEOGRAPHY' AS type
FROM pg_get_shared_redshift_columns() AS rs_cols(database_name varchar,
                                                 schema_name varchar,
                                                 table_name varchar,
                                                 column_name varchar,
                                                 column_number integer,
                                                 data_type varchar,
                                                 column_default varchar,
                                                 is_nullable boolean,
                                                 compression varchar,
                                                 is_dist_key boolean,
                                                 sort_key integer,
                                                 column_acl varchar,
                                                 remarks varchar)
WHERE CAST(rs_cols.data_type AS text) = CAST('geography' AS text)

UNION ALL

SELECT CAST(current_database() AS varchar(128)) AS f_table_catalog,
       CAST(n.nspname AS varchar(128)) AS f_table_schema,
       CAST(c.relname AS varchar(128)) AS f_table_name,
       CAST(a.attname AS varchar(128)) AS f_geography_column,
       2 AS coord_dimension,
       0 AS srid,
       'GEOGRAPHY' AS type
FROM pg_namespace AS n, pg_class AS c, pg_attribute AS a
WHERE n.oid = c.relnamespace
  AND a.attrelid = c.oid
  AND a.atttypid = CAST(3001 AS oid)


Home 3D Друк Blog Bring-Up Times Consultancy Cross-Region Benchmarks Email Forums IRC Mailing Lists Reddit Redshift Price Tracker Redshift Version Tracker Redshift Workbench System Table Tracker The Known Universe Twitter White Papers