Skip site navigation (1) Skip section navigation (2)

Re: generating dynamic queries using pl/pgsql

From: John DeSoi <desoi(at)pgedit(dot)com>
To: sarlav kumar <sarlavk(at)yahoo(dot)com>
Cc: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>,pgsqlnovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: generating dynamic queries using pl/pgsql
Date: 2005-01-21 21:41:42
Message-ID: 3D144E30-6BF5-11D9-A9C8-000A95B03262@pgedit.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Jan 21, 2005, at 11:44 AM, sarlav kumar wrote:

> The problem is that I dont have permission to create directories as a 
> postgres user.
> If I can get the \copy command or the \! pg_dump command to work, that 
> would be great.
>  

The commands starting with \ are psql commands. They are only executed 
on the client side by psql. Stored procedures of course run on the 
server, and don't know anything about psql \commands. What you can do 
is setup a script for psql that first calls your stored procedure and 
then uses \copy or \!pg_dump. But you can't put these commands in the 
stored procedure.

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


In response to

pgsql-novice by date

Next:From: KlausDate: 2005-01-21 22:33:40
Subject: How to update dependent tables AND design considerations
Previous:From: operationsengineer1Date: 2005-01-21 21:40:33
Subject: SQL and DB Connection Question (Interfacing with PHP)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group