Thread: Re: [NOVICE] Insert Only Postgresql

Re: [NOVICE] Insert Only Postgresql

From
"Brandon Aiken"
Date:

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.

Re: Insert Only Postgresql

From
"Karen Hill"
Date:
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:
> 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.
>
>
> ------_=_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--



Re: [NOVICE] Insert Only Postgresql

From
"Merlin Moncure"
Date:
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