Insert Only Postgresql
Hi All,
pls, is there an Insert only version of postgreql or any other known
database? NO deletes, no updates. Inserts only! Any leads, please?
Best Regards,
solomon.
Sure. Any RDBMS can do that. Just create a user account (login role
for PostgreSQL) and only grant the INSERT privilege to them on your
tables, then connect with that account with your program. Any DELETE or
UPDATE statements will automatically fail.
--
Brandon Aiken
CS/IT Systems Engineer
________________________________
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Solomon Asare
Sent: Friday, September 08, 2006 4:51 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Insert Only Postgresql
Hi All,
pls, is there an Insert only version of postgreql or any other known
database? NO deletes, no updates. Inserts only! Any leads, please?
Best Regards,
solomon.
On Fri, September 8, 2006 4:51 pm, Solomon Asare said:
Hi All,
pls, is there an Insert only version of postgreql or any other known
database? NO deletes, no updates. Inserts only! Any leads, please?
You can create an account that only has insert access, if that's what you
want.
Otherwise... I can't think of why a database would want to ship that way.
If you don't want to use those features, you don't have to use them.
Daniel T. Staal
---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Daniel T. Staal wrote:
<blockquote
cite="mid54442.63.172.115.138.1157750321.squirrel@MageHandbook.com"
type="cite">
<pre wrap="">On Fri, September 8, 2006 4:51 pm, Solomon Asare said:
</pre>
<blockquote type="cite">
<pre wrap="">Hi All,
pls, is there an Insert only version of postgreql or any other known
database? NO deletes, no updates. Inserts only! Any leads, please?
</pre>
</blockquote>
<pre wrap=""><!---->
You can create an account that only has insert access, if that's what you
want.
Otherwise... I can't think of why a database would want to ship that way.
If you don't want to use those features, you don't have to use them.
Daniel T. Staal</pre>
</blockquote>
<br>
Another method would be to put in code inside of update triggers
and delete triggers to prevent updates and deletes. I have never tried
that in PostGreSql before, but
i have done something similar in another DBMS. The only way to stop
people from reading the data (though selects) would be to limit the
access of the account, which that has already been noted.<br>
<br>
cyrus<br>
</body>
</html>
Don't forget that one can create a DO NOTHING rules for DELETE and
UPDATE in addition to the INSERT only privilege. This will prevent
even the owner of the table from doing any accidental updating or
deleting.
"Brandon Aiken" wrote:
Show quoted text
Sure. Any RDBMS can do that. Just create a user account (login role
for PostgreSQL) and only grant the INSERT privilege to them on your
tables, then connect with that account with your program. Any DELETE or
UPDATE statements will automatically fail.--
Brandon Aiken
CS/IT Systems Engineer
________________________________
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Solomon Asare
Sent: Friday, September 08, 2006 4:51 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Insert Only PostgresqlHi All,
pls, is there an Insert only version of postgreql or any other known
database? NO deletes, no updates. Inserts only! Any leads, please?Best Regards,
solomon.------_=_NextPart_001_01C6D38C.2205C945
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
X-Google-AttachSize: 4226<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style></head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sure. Any RDBMS can do that. Just create
a user account (login role for PostgreSQL) and only grant the INSERT privilege
to them on your tables, then connect with that account with your program. Any
DELETE or UPDATE statements will automatically fail.<o:p></o:p></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p><div>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>--</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p></div>
<div>
<p class=MsoNormal><st1:PersonName w:st="on"><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Brandon
Aiken</span></font></st1:PersonName><font color=navy><span style='color:navy'><o:p></o:p></span></font></p></div>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>CS/IT Systems Engineer</span></font><o:p></o:p></p></div>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Solomon Asare<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, September 08, 2006
4:51 PM<br>
<b><span style='font-weight:bold'>To:</span></b> pgsql-novice@postgresql.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [NOVICE] Insert Only
Postgresql</span></font><o:p></o:p></p></div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi All,<br>
pls, is there an Insert only version of postgreql or any other known database?
NO deletes, no updates. Inserts only! Any leads, please?<br>
<br>
Best Regards,<br>
solomon.<o:p></o:p></span></font></p></div>
</body>
</html>
------_=_NextPart_001_01C6D38C.2205C945--
On 9/8/06, Brandon Aiken <BAiken@winemantech.com> wrote:
Sure. Any RDBMS can do that. Just create a user account (login role for
PostgreSQL) and only grant the INSERT privilege to them on your tables, then
connect with that account with your program. Any DELETE or UPDATE
statements will automatically fail.
all tables in postgresql have insert, update, and delete rights you
can grant or revoke. If you want to be smart and save time, you can
make a procedure to query information_schema and do this automatically
for you with some dynamic sql [hi, karen!] and just call it whenever
you make new tables.
merlin