Thread: plpgsql question

plpgsql question

From
Alejandro Javier Pomeraniec
Date:
Hi !!

Is it possible to put inside a plpgsql function psql commands like \pset ?

Thanks !!

Re: plpgsql question

From
Bill Moran
Date:
Alejandro Javier Pomeraniec wrote:
> Hi !!
>
> Is it possible to put inside a plpgsql function psql commands like \pset ?

No.  These commands are handled by psql, not the Postgres server.

It's likely that there's a method of doing what you want on the back-end though,
although it might not be as easy as it is in psql.

--
Bill Moran
Potential Technologies
http://www.potentialtech.com

Re: plpgsql question

From
Alejandro Javier Pomeraniec
Date:
Hi again !

I'm  trying to export query results to a file inside a plpgsql function, is there any way to achieve this?

Thanks !!


On Wed, 05 May 2004 09:27:20 -0400
Bill Moran <wmoran@potentialtech.com> wrote:

> Alejandro Javier Pomeraniec wrote:
> > Hi !!
> >
> > Is it possible to put inside a plpgsql function psql commands like \pset ?
>
> No.  These commands are handled by psql, not the Postgres server.
>
> It's likely that there's a method of doing what you want on the back-end though,
> although it might not be as easy as it is in psql.
>
> --
> Bill Moran
> Potential Technologies
> http://www.potentialtech.com

Re: plpgsql question

From
Bill Moran
Date:
Alejandro Javier Pomeraniec wrote:
> Hi again !
>
> I'm  trying to export query results to a file inside a plpgsql function, is there any way to achieve this?

http://www.postgresql.org/docs/7.4/interactive/sql-copy.html

--
Bill Moran
Potential Technologies
http://www.potentialtech.com