473,809 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grants on rules

Hi all,

I am trying to mimic a table's behaviour on a view thru rules. More
precisely, I have a table (say, my_table(field1 ,field2)) and a view
(my_view as select my_field from my_table). For allowing inserts into
the view, I have create a rule on "insert into my_view" doing instead
insert into my_table(field1 ,field2) values (NEW.field1,NUL L). It works
fine, but...
I can GRANT or REVOKE privileges (SELECT, INSERT and so on) on my_view
and my_table, but insert into my_view is always allowed, even for users
that haven't SELECT or INSERT privileges neither on my_table or my_view.

How can I restrict the users that can insert into my_view?

Thank you for your answers.

--
-----------------------
Alberto Cabello Sánchez
al*****@unex.es
Servicio de Informática
924 289 351
-----------------------

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
1 1174
Alberto Cabello Sanchez <al*****@unex.e s> writes:
I can GRANT or REVOKE privileges (SELECT, INSERT and so on) on my_view
and my_table, but insert into my_view is always allowed, even for users
that haven't SELECT or INSERT privileges neither on my_table or my_view.


I think there was a bug of this ilk between 7.3.3 and 7.3.5, and
possibly also in some of the 7.4 releases. If that's what you're using,
update to 7.3.6 or 7.4.3.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
553
by: Sohail Hasan | last post by:
Hi All, I want to bring back my mysql original database as well as root GRANTS as was during the installation because i installed an application that modified my root GRANTS and now I am not able to see my mysql database as I login from root account. I am not even able to create or delete any database when login as root. Is there any other way to reclaim the root GRANTS by using mysqladmin command?? Sincerely,
4
1940
by: Dr John Stockton | last post by:
It looks as if the USA may be changing its Summer Time (DST) Rules, perhaps with immediate effect. Browsers use the rules selected in the OS, and I predict that in many cases the rules will not have been updated. Since time servers send GMT/UTC, the actual civil time of the computer may be wrong; or, if the user corrects it manually the results of UTC functions may be wrong.
0
1182
by: vcp | last post by:
<xml newbie> Hi all, We are considering using XML to specify rules, policies. This XML file will be used to generate source code in either managed C++ or C#, which will be implemention of API to be used by different applications program (written in .NET language, for this dicussion). You can contribute your ideas.
20
3774
by: nicolas.riesch | last post by:
I try to understand strict aliasing rules that are in the C Standard. As gcc applies these rules by default, I just want to be sure to understand fully this issue. For questions (1), (2) and (3), I think that the answers are all "yes", but I would be glad to have strong confirmation. About questions (4), (5) and (6), I really don't know. Please help ! ! !
2
2048
by: Mikedi | last post by:
Hi. I use Exchange Server and I need to create a lot of rules to control my incomming mail. I also need be able to check my mailbox from any PC connected to the net. However there is only 32Kb of space reserved for rules on each inbox folder, which is insufficient. I have searched the web for at solution, and it seems that I have to create additional folders, and move/copy my Inbox rules to them + make a forwarding rule that checks all...
1
839
by: Miguel | last post by:
Hello, I have a vb.net application that can create and copy files to a server. The problem comes when I put all that code in a Service but there is no way to access the server. Does anybody know if I the Windows application has special grants that the service has not??. Is there some code o configuration to make it work?? Thanks for your help.
1
689
by: Mark D Powell | last post by:
Using SQL Server 2000 I need to extract all the grants made to a user created role so that I can recreate the role in another version of a database and there are more grants than I want to do by hand. Does anyone have SQL or T-SQL to perform this task that they would be willing to share? I tried searching the archives but either I missed the post or what I want isn't posted. Thank you.
7
4805
by: Nick Chan | last post by:
hello, i've just started playing around with rules and udt is it possible to alter rule? are rules 'slower' compared to check constraint?
0
1419
OraMaster
by: OraMaster | last post by:
Why grants assigned via roles do not work in named PL/SQL (despite working in anonymous PL/SQL)? Does anyone have explaination for this.
0
9602
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10639
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.