Search Postgresql Archives

Re: Looking for auto starting procedures

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

 



On Dec 2, 2010, at 1:27 PM, <mabra@xxxxxxxxxxxx> <mabra@xxxxxxxxxxxx> wrote:
> 
> I have not understand, where I can issue direct sql statements
> and it looks like, the RAISE is not possible with plSql:

Right, it's not actually SQL, so you can't use it in plain SQL. It is part of the plpgsql procedural language.

So you could easily create a small stored procedure, for example:

create function myraise(msg varchar, id varchar) returns void as $$ begin
raise notice '%: %', msg, id;
end; $$ language plpgsql;

and call that from SQL:

select myraise ('mymsg', '1234');

-- 
Scott Ribe
scott_ribe@xxxxxxxxxxxxxxxx
http://www.elevated-dev.com/
(303) 722-0567 voice





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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