How to use slash commands in a function

From: vanessa <vanessaknell(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to use slash commands in a function
Date: 2007-02-16 01:30:20
Message-ID: 8997475.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Casey Duncan 2007-02-16 01:39:04 Re: Where art thou pg_clog?
Previous Message Kenneth Downs 2007-02-16 01:24:26 Re: ROLE INHERIT