Re: [GENERAL] How to get text for a plpgsql variable from a file.

2009-12-17 Thread Erik Jones
On Dec 16, 2009, at 11:19 AM, Erwin Brandstetter wrote: > Hello, > > I need a long text form from a file in my plpgsql variable. > Can anyone think of a more straightforward way to read the file than > the following: > > > CREATE FUNCTION test() RETURNS void AS > $BODY$ > DECLARE >

Re: [GENERAL] How to get text for a plpgsql variable from a file.

2009-12-17 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 NotDashEscaped: You need GnuPG to verify this message > I need a long text form from a file in my plpgsql variable. > Can anyone think

Re: [GENERAL] How to get text for a plpgsql variable from a file.

2009-12-16 Thread Pavel Stehule
2009/12/17 Erwin Brandstetter : > On Dec 16, 10:47 pm, pavel.steh...@gmail.com (Pavel Stehule) wrote: >> hello >> >> look on orafce from pgfoundry. There modul utl_file >> >> http://www.postgres.cz/index.php/Oracle_functionality_%28en%29#UTL_FILE > > > Thanks Pavel, that should do the trick. > > I

Re: [GENERAL] How to get text for a plpgsql variable from a file.

2009-12-16 Thread Erwin Brandstetter
On Dec 16, 10:47 pm, pavel.steh...@gmail.com (Pavel Stehule) wrote: > hello > > look on orafce from pgfoundry. There modul utl_file > > http://www.postgres.cz/index.php/Oracle_functionality_%28en%29#UTL_FILE Thanks Pavel, that should do the trick. I assume then, there is no easier built-in way i

Re: [GENERAL] How to get text for a plpgsql variable from a file.

2009-12-16 Thread Pavel Stehule
hello look on orafce from pgfoundry. There modul utl_file http://www.postgres.cz/index.php/Oracle_functionality_%28en%29#UTL_FILE Regards Pavel Stehule 2009/12/16 Erwin Brandstetter : > Hello, > >        I need a long text form from a file in my plpgsql variable. > Can anyone think of a more st

[GENERAL] How to get text for a plpgsql variable from a file.

2009-12-16 Thread Erwin Brandstetter
Hello, I need a long text form from a file in my plpgsql variable. Can anyone think of a more straightforward way to read the file than the following: CREATE FUNCTION test() RETURNS void AS $BODY$ DECLARE mytxt text; BEGIN CREATE TEMP TABLE x (x text); COPY x from '/path/to/myfi