From: | <mabra(at)manfbraun(dot)de> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Looking for auto starting procedures |
Date: | 2010-12-02 23:04:36 |
Message-ID: | !&!AAAAAAAAAAAYAAAAAAAAAOb5xiPoTM8RjQUAgEiElinCgAAAEAAAAC8CIkjg5g5EktC8+W06lqYBAAAAAA==@manfbraun.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello !
Very good, thanks !
I've just not understood, when I have to write a function to test sql code
and when I can do it interactively.
Your shown function compiles and works, but I do not have the
result in the logs [altough I see th executing function with
my settings to 'debug' ;-) ].
Will just configure the logging tomorrow, that way, that the
stronger ones are going to the syslog.
br++mabra
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Scott Ribe
Sent: Thursday, December 02, 2010 11:22 PM
To: mabra(at)manfbraun(dot)demabra@manfbraun.de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Looking for auto starting procedures
On Dec 2, 2010, at 1:27 PM, <mabra(at)manfbraun(dot)de> <mabra(at)manfbraun(dot)de> 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(at)elevated-dev(dot)com
http://www.elevated-dev.com/
(303) 722-0567 voice
From | Date | Subject | |
---|---|---|---|
Next Message | Brent Wood | 2010-12-03 00:15:55 | Re: Dumping a table from one database and adding it to another |
Previous Message | Peter Eisentraut | 2010-12-02 22:44:55 | Re: How to find correct locale name for CREATEDATABASE |