{ SELECT *->NOT(column1, column2) FROM table } syntax idea

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: { SELECT *->NOT(column1, column2) FROM table } syntax idea
Date: 2011-06-15 22:08:06
Message-ID: 02ce01cc2ba8$b477c530$1d674f90$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there, or has there ever been, a discussion about introducing syntax to
handle specifying which columns you do NOT want to output in the SELECT
list?

The use case I am running into is mostly within VIEWS. I want to specify
"SELECT * FROM table" but there are a couple of fields that I do NOT want to
output (for instance a password hash field for a user table). I guess it
would probably be better form to move those columns to a separate enhanced
permissions table but since PostgreSQL allows for per-column permissions
that is not strictly necessary. Listing all the wanted columns is not
desirable though obviously possible. The main reason to avoid doing so is
to allow for a view to output all the columns of the underlying tables. If
I drop/create the view after altering the underlying tables the new view
will have the additional columns without any direct change to the view being
required.

David J.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Russell Smith 2011-06-15 22:12:35 = ANY (SELECT ..) and type casts, what's going on here?
Previous Message Matthew A. R. Sherian 2011-06-15 22:03:16 Further details on cursors.