Database schema (PostgreSQL)

<< Click to Display Table of Contents >>

Navigation:  Supported database systems > PostgreSQL >

Database schema (PostgreSQL)

The following command can be used to view the database schema:

 

SELECT

--

-- https://stackoverflow.com/questions/37099663/listing-all-relations-with-schema-and-columns-in-postgresql

--

table_name, column_name, ordinal_position,

column_default, is_nullable, data_type,

character_maximum_length, numeric_precision,

numeric_precision_radix, numeric_scale

FROM

information_schema.columns

--

-- you can modify the WHERE clause to include the names of any new Ticket Tables that you may have created

--

WHERE

table_schema = 'public' and table_name LIKE 'dsptch30_%' OR table_name LIKE 'receipt_ticket%' OR table_name LIKE 'shipment_ticket%'

ORDER BY

table_name, ordinal_position