Search Postgresql Archives

Minor systax error but not able to resolve it...

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

 



Hi, could anyone please help me to sort out below error. I have spent lot of time but couldn't resolved it.
 
mydb=> CREATE OR REPLACE FUNCTION test_create()
  RETURNS void AS
$BODY$
$cmd = "CREATE TABLE test-table(col varchar not null);";
spi_exec_query("CREATE OR REPLACE FUNCTION my_tmp_func() RETURNS void AS $cmd LANGUAGE sql;");
$BODY$
  LANGUAGE 'plperl';
CREATE FUNCTION
mydb=> SELECT test_create();
ERROR:  error from Perl function "test_create": syntax error at or near "CREATE" at line 3.
mydb=>
 
I want to create function from my stored procedure in any language.
 
Thanks,
Dipti

[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