How to use slash commands in a function - Mailing list pgsql-general

From vanessa
Subject How to use slash commands in a function
Date
Msg-id 8997475.post@talk.nabble.com
Whole thread Raw
Responses Re: How to use slash commands in a function  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
Hi guys,

I was wondering how could i (if at all possible) to use say a command like:
\! touch fred.txt     in a function?
i.e.

CREATE FUNCTION myfunc() RETURNS TRIGGER AS
'BEGIN
        \! touch fred.txt
         RETURN NEW;
END;'
LANGUAGE 'plpgsql';

At the moment i get:
ERROR: syntax error at or near "\"
Does this mean i should encapsulate the line in quotation marks or something
like that?

Cheers.
Vanessa


--
View this message in context: http://www.nabble.com/How-to-use-slash-commands-in-a-function-tf3237240.html#a8997475
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Kenneth Downs
Date:
Subject: Re: ROLE INHERIT
Next
From: Casey Duncan
Date:
Subject: Re: Where art thou pg_clog?