Re: How to write a psql command inside a function?

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: Siva Palanisamy <siva_p(at)hcl(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to write a psql command inside a function?
Date: 2011-08-17 05:42:03
Message-ID: CAKt_ZfuA3caRktU7m9Gx2nXvFvPnGjf4KLNFAYC4j12Ls5Xmpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 16, 2011 at 10:33 PM, Siva Palanisamy <siva_p(at)hcl(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Siva Palanisamy 2011-08-17 05:45:02 Re: How to write a psql command inside a function?
Previous Message Siva Palanisamy 2011-08-17 05:33:04 How to write a psql command inside a function?