pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedhow to create dir using pg/plsql
7+ messages / 6 participants
[nested] [flat]
* how to create dir using pg/plsql
@ 2007-08-29 06:45 qinghuamail-postgresqlfans@yahoo.com
0 siblings, 2 replies; 7+ messages in thread
From: qinghuamail-postgresqlfans@yahoo.com @ 2007-08-29 06:45 UTC (permalink / raw)
To: pgsql-admin
just subject,
i need to create dir using pg/plsql function,,but cannt get anything after google,
please advise? thanks!
---------------------------------
雅虎邮箱,以安全著称,是值得信赖的邮箱专家!
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: how to create dir using pg/plsql
@ 2007-08-29 08:27 hubert depesz lubaczewski <depesz@depesz.com>
parent: qinghuamail-postgresqlfans@yahoo.com
1 sibling, 0 replies; 7+ messages in thread
From: hubert depesz lubaczewski @ 2007-08-29 08:27 UTC (permalink / raw)
To: qinghuamail-postgresqlfans@yahoo.com; +Cc: pgsql-admin
On Wed, Aug 29, 2007 at 02:45:56PM +0800, qinghuamail-postgresqlfans@yahoo.com wrote:
> just subject,
> i need to create dir using pg/plsql function,,but cannt get anything after google,
it's not possible.
pl/pgsql is trusted language (like pl/perl and pl/tcl). trusted
languages cannot use system-level functions. so no file, directory,
socket access is possible.
depesz
--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA. here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: how to create dir using pg/plsql
@ 2007-08-29 15:28 Scott Marlowe <scott.marlowe@gmail.com>
parent: qinghuamail-postgresqlfans@yahoo.com
1 sibling, 1 reply; 7+ messages in thread
From: Scott Marlowe @ 2007-08-29 15:28 UTC (permalink / raw)
To: qinghuamail-postgresqlfans@yahoo.com; +Cc: pgsql-admin
On 8/29/07, qinghuamail-postgresqlfans@yahoo.com
<qinghuamail-postgresqlfans@yahoo.com> wrote:
> just subject,
>
> i need to create dir using pg/plsql function,,but cannt get anything after
> google,
As noted, not possible. BUT, you can do it in untrusted languages,
like pl/perlu or pl/tclu or pl/C
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: how to create dir using pg/plsql
@ 2007-08-29 16:28 Medi Montaseri <montaseri@gmail.com>
parent: Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Medi Montaseri @ 2007-08-29 16:28 UTC (permalink / raw)
To: Scott Marlowe <scott.marlowe@gmail.com>; +Cc: pgsql-admin
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.
I appreciate a clarification.
Medi
On 8/29/07, Scott Marlowe <scott.marlowe@gmail.com> wrote:
>
> On 8/29/07, qinghuamail-postgresqlfans@yahoo.com
> <qinghuamail-postgresqlfans@yahoo.com> wrote:
> > just subject,
> >
> > i need to create dir using pg/plsql function,,but cannt get anything
> after
> > google,
>
> As noted, not possible. BUT, you can do it in untrusted languages,
> like pl/perlu or pl/tclu or pl/C
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: how to create dir using pg/plsql
@ 2007-08-29 16:47 Tom Lane <tgl@sss.pgh.pa.us>
parent: Medi Montaseri <montaseri@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Tom Lane @ 2007-08-29 16:47 UTC (permalink / raw)
To: Medi Montaseri <montaseri@gmail.com>; +Cc: Scott Marlowe <scott.marlowe@gmail.com>; pgsql-admin
"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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: how to create dir using pg/plsql
@ 2007-08-29 20:50 Medi Montaseri <montaseri@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Medi Montaseri @ 2007-08-29 20:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Scott Marlowe <scott.marlowe@gmail.com>; pgsql-admin
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
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: how to create dir using pg/plsql
@ 2007-08-29 21:54 Alvaro Herrera <alvherre@commandprompt.com>
parent: Medi Montaseri <montaseri@gmail.com>
0 siblings, 0 replies; 7+ messages in thread
From: Alvaro Herrera @ 2007-08-29 21:54 UTC (permalink / raw)
To: Medi Montaseri <montaseri@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Scott Marlowe <scott.marlowe@gmail.com>; pgsql-admin
Medi Montaseri escribió:
> I see...thank you for the clarification...one more question...
> How does PG protects itself from a run-away code (eg an endless loop) ?
It doesn't.
> In other words, does PG run the "untrusted" code in a seperate
> process?
No.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2007-08-29 21:54 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 06:45 how to create dir using pg/plsql qinghuamail-postgresqlfans@yahoo.com
2007-08-29 08:27 ` hubert depesz lubaczewski <depesz@depesz.com>
2007-08-29 15:28 ` Scott Marlowe <scott.marlowe@gmail.com>
2007-08-29 16:28 ` Medi Montaseri <montaseri@gmail.com>
2007-08-29 16:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-08-29 20:50 ` Medi Montaseri <montaseri@gmail.com>
2007-08-29 21:54 ` Alvaro Herrera <alvherre@commandprompt.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox