Subject | Re: previleges according to date |
---|---|
Author | duilio_fos <irel_llc@libero.it> |
Post date | 2002-12-29T09:15:08Z |
Ann,
this was my first idea, but then I performed some tests that made me
reject it.
1. I built a very simple table:
create table test_table (
field_date timestamp
)
2. I inserted 2 records:
insert into test_table values ('2002-12-29');
insert into test_table values ('2002-12-30');
3. I built a view
create view test_view (field_date) as
select field_date from test_table where field_date>='2002-12-30';
4. I tested the view:
select field_date from test_view
and - as expected - only 1 record was shown ('2002-12-30')
5. I wrote
insert into test_view values ('2002-12-29');
and IT WAS ACCEPTED.
So you see that a view cannot be of much help in my case, as I must
prevent a normal user from inserting dates before a given date.
Thank you
Duilio
> It might be easier to define views for normal users that arerestricted to the set of records they can access
this was my first idea, but then I performed some tests that made me
reject it.
1. I built a very simple table:
create table test_table (
field_date timestamp
)
2. I inserted 2 records:
insert into test_table values ('2002-12-29');
insert into test_table values ('2002-12-30');
3. I built a view
create view test_view (field_date) as
select field_date from test_table where field_date>='2002-12-30';
4. I tested the view:
select field_date from test_view
and - as expected - only 1 record was shown ('2002-12-30')
5. I wrote
insert into test_view values ('2002-12-29');
and IT WAS ACCEPTED.
So you see that a view cannot be of much help in my case, as I must
prevent a normal user from inserting dates before a given date.
Thank you
Duilio