Unix Technical Forum

writing a file using procedure

This is a discussion on writing a file using procedure within the Pgsql General forums, part of the PostgreSQL category; --> Can we write/read a file in postgresql procedure ?...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 09:14 PM
Nageshwar Rao
 
Posts: n/a
Default writing a file using procedure

Can we write/read a file in postgresql procedure ?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 09:14 PM
Peter Eisentraut
 
Posts: n/a
Default Re: writing a file using procedure

Am Donnerstag, 2. Juni 2005 11:36 schrieb Nageshwar Rao:
> Can we write/read a file in postgresql procedure ?


That depends on the language you use. PL/PerlU and PL/sh can do it, for
example, whereas plain PL/Perl or PL/pgSQL cannot.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 09:14 PM
Tino Wildenhain
 
Posts: n/a
Default Re: writing a file using procedure

Am Donnerstag, den 02.06.2005, 15:06 +0530 schrieb Nageshwar Rao:
> Can we write/read a file in postgresql procedure ?


Yes.
--
Tino Wildenhain <tino@wildenhain.de>


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 09:14 PM
Richard Huxton
 
Posts: n/a
Default Re: writing a file using procedure

Nageshwar Rao wrote:
> Can we write/read a file in postgresql procedure ?


Using one of the "untrusted" languages, yes. They can only be used by an
administrator but have access to the full capabilities of the underlying
procedural language.

Of course, you will read and write files as the user PostgreSQL runs as,
which opens up a whole world of possibilities regarding security
breaches and database destruction.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 09:14 PM
Michael Fuhr
 
Posts: n/a
Default Re: writing a file using procedure

On Thu, Jun 02, 2005 at 11:00:56AM +0100, Richard Huxton wrote:
> Nageshwar Rao wrote:
> >Can we write/read a file in postgresql procedure ?

>
> Using one of the "untrusted" languages, yes. They can only be used by an
> administrator but have access to the full capabilities of the underlying
> procedural language.


To qualify the above: only database superusers can create functions
written in an untrusted language, but any user can call such functions.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:44 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com