How to hidde the column from the user

Started by rupesh bajajover 18 years ago4 messages
#1rupesh bajaj
rupesh.bajaj@gmail.com

Hi,
I want to add a column in the table and also want to hidde that column from
the user. So that user's normal insertion and update goes on (means user
will not supply the value for my hidden column). Is there any way to hidde
the column from the user. I tried to make my column (attisdropped setting as
true). So now that column is hide from the user but now that column will be
sometime deleted by postgres. But i do not want that my column should be
deleted. Is there any way for doing this. Or can you suggest some better way
for this.

Thanks,
Rupesh Bajaj

#2Heikki Linnakangas
heikki@enterprisedb.com
In reply to: rupesh bajaj (#1)
Re: How to hidde the column from the user

rupesh bajaj wrote:

Hi,
I want to add a column in the table and also want to hidde that column from
the user. So that user's normal insertion and update goes on (means user
will not supply the value for my hidden column). Is there any way to hidde
the column from the user. I tried to make my column (attisdropped
setting as
true). So now that column is hide from the user but now that column will be
sometime deleted by postgres. But i do not want that my column should be
deleted. Is there any way for doing this. Or can you suggest some better
way
for this.

You should ask usage questions on pgsql-general to get more informative
responses.

Create a view on top of the table that hides the column.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

#3Martijn van Oosterhout
kleptog@svana.org
In reply to: rupesh bajaj (#1)
Re: How to hidde the column from the user

On Tue, May 01, 2007 at 03:09:17PM +0530, rupesh bajaj wrote:

Hi,
I want to add a column in the table and also want to hidde that column from
the user. So that user's normal insertion and update goes on (means user
will not supply the value for my hidden column). Is there any way to hidde
the column from the user. I tried to make my column (attisdropped setting as
true). So now that column is hide from the user but now that column will be
sometime deleted by postgres. But i do not want that my column should be
deleted. Is there any way for doing this. Or can you suggest some better way
for this.

Make it a view on a real table and revoke access permissions on the
real table?

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

From each according to his ability. To each according to his ability to litigate.

#4Oleg Bartunov
oleg@sai.msu.su
In reply to: rupesh bajaj (#1)
Re: How to hidde the column from the user

On Tue, 1 May 2007, rupesh bajaj wrote:

Hi,
I want to add a column in the table and also want to hidde that column from
the user. So that user's normal insertion and update goes on (means user
will not supply the value for my hidden column). Is there any way to hidde
the column from the user. I tried to make my column (attisdropped setting as
true). So now that column is hide from the user but now that column will be
sometime deleted by postgres. But i do not want that my column should be
deleted. Is there any way for doing this. Or can you suggest some better way
for this.

Let user work with view public.table_view, which is a view of
backend.table.

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83