This script returns all schemas, tables and columns within RedShift or Postgres. select table_schema, table_name, ordinal_position as position, column_name, data_type, case when character_maximum_length is not null then character_maximum_length else numeric_precision end as max_length, is_nullable, column_default as default_value from information_schema.columns order by table_schema, table_name, ordinal_position;
A common SQL question is, why does anyone use WHERE 1=1 in their queries? And what does it do? The condition means WHERE TRUE, so it’s just bringing back the same query result as it would without.
If you forget what you entered as the postgres user password during installation, then this is a guide for you! It’s exactly what I did which is the reason for a post.
A very simple wizard run-through of a PostgreSQL and Stack Builder installations. Installing PostgreSQL PostgreSQL official downloads can be found here.