Thread: Creation of file from postgresql function

Creation of file from postgresql function

From
"Jyoti Seth"
Date:
Hi,

I want to create a file on a disk through postgres function. I am trying to
use large objects functions (lo_create, lo_open and lo_write) for this.

In this, lo_open command is throwing error "invalid mode" or "Syntax error
whereas I have given the value of INV_WRITE from libpq-fs.h as mode.

libpq-fs.h File
#define INV_WRITE               0x00020000
#define INV_READ                0x00040000

If anyone has idea about this problem or know any other alternative to
create a file from postgres function, please let me know.

Thanks,
Jyoti



Re: Creation of file from postgresql function

From
"A. Kretschmer"
Date:
In response to Jyoti Seth :
> If anyone has idea about this problem or know any other alternative to
> create a file from postgres function, please let me know.
> 
> Thanks,
> Jyoti

On server-side?

You need a function written in an untrusted language, for instance
pl/perlU or plsh.


Regards, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net