Re: How to write a psql command inside a function? - Mailing list pgsql-general

From Chris Travers
Subject Re: How to write a psql command inside a function?
Date
Msg-id CAKt_ZfuA3caRktU7m9Gx2nXvFvPnGjf4KLNFAYC4j12Ls5Xmpw@mail.gmail.com
Whole thread Raw
In response to How to write a psql command inside a function?  (Siva Palanisamy <siva_p@hcl.com>)
Responses Re: How to write a psql command inside a function?
List pgsql-general
On Tue, Aug 16, 2011 at 10:33 PM, Siva Palanisamy <siva_p@hcl.com> wrote:
> Hi All,
>
>
>
> I want to have a psql command ‘\COPY’ inside a function. By default, this
> command works as such. But, not inside a function. Please guide me.
>
I don't think that works  I think you have to use SQL commands since,
well, the function is running in the db, not in your client.

Look up the SQL COPY command instead.

Best Wishes,
Chris Travers

pgsql-general by date:

Previous
From: Siva Palanisamy
Date:
Subject: How to write a psql command inside a function?
Next
From: Sim Zacks
Date:
Subject: Re: Using Postgresql as application server