hiding column values for specific rows

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема hiding column values for specific rows
Дата
Msg-id 200611131411.50562.fluca1978@infinito.it
обсуждение исходный текст
Ответы Re: hiding column values for specific rows
Re: hiding column values for specific rows
Список pgsql-sql
Hi,
I don't know if this's possible but I'd like to hide column values for 
specific rows within a query. Imagine I've got a table with columns username 
and password: users(username,password). Now I'd like the user registered in 
the table to see her password, to see who is registered but not to see the 
other people passwords. For example, if the table contains:
username  | password
--------------+-------------
luca            | myPaswd
roberto       | otherPaswd
gianna        | thirdPaswd

I'd like to do a query like: "SELECT * FROM users where username=luca" 
obtaining something like:
username  | password
--------------+-------------
luca            | myPaswd
roberto       | xxxxx
gianna        | XXXXX

Is it possible to specify in the above query that all password columns that do 
not belong to selected row (username=luca) must be hidden? Anyone has an idea 
about how to implement this on the database side?

Thanks,
Luca


В списке pgsql-sql по дате отправления:

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: Inserting data in composite types!
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: hiding column values for specific rows