The Open Source Swiss Army Knife

/sql_servers/postgresql/pg_plpgsql/
/sql_servers/postgresql/pg_plpgsql/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /sql_servers   /postgresql   /pg_plpgsql 
Permalink: raise_performl.sql
Title: add
article options : please login   |  raw source view  

보낸 사람: Patrick Refondini <patrick.refondini@pobox.com>
받는 사람: pgsql-general@postgresql.org
제목: [SPAM] [GENERAL] RAISE function misuse ?
ë‚ ì§œ: Mon, 03 Apr 2006 17:44:18 +0200 ((íTM”) 00:44 KST)

Hi,
I obtain the following output:

idns_target=# select test();
INFO: hello !
CONTEXT: SQL statement "SELECT hello()"
PL/pgSQL function "test" line 2 at perform

Using the two following functions:

CREATE OR REPLACE FUNCTION hello() RETURNS void AS $$
BEGIN

RAISE INFO 'hello !';
RETURN;
END;
$$ LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION test() RETURNS void AS $$
BEGIN

PERFORM hello();
RETURN;
END;
$$ LANGUAGE plpgsql;

I would like to know:
1. Is there anything wrong using RAISE this way.
2. Is there a way to get rid of the output:
CONTEXT: SQL statement "SELECT hello()"
PL/pgSQL function "test" line 2 at perform


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top