find columns that contain a single value for all rows - Mailing list pgsql-general

From gkl12799@gmail.com
Subject find columns that contain a single value for all rows
Date
Msg-id F95EB440-A48B-4044-AC6A-5EF1A4944C9B@gmail.com
Whole thread Raw
List pgsql-general
Hi,

Is there an easy way to find all the columns in all the tables in a
database which contain the same value for all rows?

For example, Column A contains the value '365' for all of the rows in
Table One:

Col A
--------
   365
   365
   365
   365
   365
   ...
   ...
   ...

I need a recursive function or query that will find all columns like
this and remove them from their respective tables ...

Thanks,

Gerry




pgsql-general by date:

Previous
From: "Vinesh, Raghavan"
Date:
Subject: Installation of PostgreSQL Service under admin account
Next
From: "Christian Maier"
Date:
Subject: Re: postmaster disconnects after heavy load inserts from plperlu -> waht to do?