Return only non-null columns

From: Dorian Hoxha <dorian(dot)hoxha(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Return only non-null columns
Date: 2013-11-13 12:57:49
Message-ID: CANsFX05UT+LArSm-45eoFwuhV528M9vVzpVgJ3aMTvx0+dsNXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it possible to:

SELECT * FROM table

But to return only non-null columns ?
Since i use psycopg2 with DictCursor (a hashtable) it's better for me when
i don't have the column that to have it as NULL.

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2013-11-13 13:00:16 Re: Return only non-null columns
Previous Message Gabriel Sánchez Martínez 2013-11-13 12:49:18 Re: Partitioned table question