Search Postgresql Archives

How to use slash commands in a function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux