Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D4A989FA551 for ; Wed, 29 Aug 2007 17:50:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 09731-02 for ; Wed, 29 Aug 2007 17:50:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by postgresql.org (Postfix) with ESMTP id 0AA8A9F9D2F for ; Wed, 29 Aug 2007 17:50:06 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id u77so2730874pyb for ; Wed, 29 Aug 2007 13:50:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=JhKTtpjIKVjl7HX0dhSrjm5mr+u2LOrqX8w7dQ/Erafk9hc5H3toteWQPbdzbmTNpbHVrn008BXWBT1SMtwXIbqBSPiLDr4dZC1f1S5xhD4n8OFTCKg1mCn2njCYE8t2L5GrD4vJz/M6qhL1hCeRnMneYEnOBSlWdR5sC92LbdU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=qBM76aG7U0RDosVNG0x/iOx2Z1Uctc8Jh2BwhvUOtYZm3FapYOLGvNnzdP2eOy6CEBnyWY+xolF/SPBqynZuVa60m/0ogiIfqPjeVCeSlF7cHOaNFGYe2wnle+rAs/qP9rtsAJcnGkEjB8Z0qVUQkKcs4nzQbY7XZzBdV3GsP1w= Received: by 10.65.214.19 with SMTP id r19mr2292073qbq.1188420604865; Wed, 29 Aug 2007 13:50:04 -0700 (PDT) Received: by 10.65.110.15 with HTTP; Wed, 29 Aug 2007 13:50:04 -0700 (PDT) Message-ID: <8078a1730708291350t8eb7f2fh352ef94959a45647@mail.gmail.com> Date: Wed, 29 Aug 2007 13:50:04 -0700 From: "Medi Montaseri" To: "Tom Lane" Subject: Re: how to create dir using pg/plsql Cc: "Scott Marlowe" , qinghuamail-postgresqlfans@yahoo.com, postgresql-admin In-Reply-To: <5790.1188406075@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3013_31499577.1188420604819" References: <715958.65839.qm@web58103.mail.re3.yahoo.com> <8078a1730708290928t63620ae2h9cd3262edc40e0fe@mail.gmail.com> <5790.1188406075@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/405 X-Sequence-Number: 26736 ------=_Part_3013_31499577.1188420604819 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I see...thank you for the clarification...one more question... How does PG protects itself from a run-away code (eg an endless loop) ? In other words, does PG run the "untrusted" code in a seperate process? Thanks Medi On 8/29/07, Tom Lane wrote: > > "Medi Montaseri" writes: > > I was under the impression that recent modern databases, like PG, allow > you > > to transfer control to an out-of-system (system being the DB engine) > module > > (shared lib, dll). That is while triggers transfer control within the > > system, now mechanisms exists that allow you to go outside of the > system. In > > that context, whence the control is transferred to a C, Perl or whatever > > language, who is to stop that function from doing anything it wants. > > Well, sure. Postgres calls those untrusted languages, and only lets > database superusers use them. > > regards, tom lane > ------=_Part_3013_31499577.1188420604819 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I see...thank you for the clarification...one more question...
How does PG protects itself from a run-away code (eg an endless loop) ? In other words, does PG run the "untrusted" code in a seperate process?

Thanks
Medi

On 8/29/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Medi Montaseri" <montaseri@gmail.com> writes:
> I was under the impression that recent modern databases, like PG, allow you
> to transfer  control to an out-of-system (system being the DB engine) module
> (shared lib, dll). That is while triggers transfer control within the
> system, now mechanisms exists that allow you to go outside of the system. In
> that context, whence the control is transferred to a C, Perl or whatever
> language, who is to stop that function from doing anything it wants.

Well, sure.  Postgres calls those untrusted languages, and only lets
database superusers use them.

                        regards, tom lane

------=_Part_3013_31499577.1188420604819--