From: Bruce Momjian <bruce@momjian.us>
To: Thom Brown <thom@linux.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: Non-existent cs_log function
Date: Fri, 11 Mar 2011 08:48:05 -0500 (EST)
Message-ID: <201103111348.p2BDm5u13846@momjian.us> (raw)
In-Reply-To: <AANLkTinrjCbyx2MaGnqCyNb6Ev5TMs93gY2yis70CgjM@mail.gmail.com>
Thom Brown wrote:
> It's been pointed out that on the pl/pgsql control structures page
> (http://www.postgresql.org/docs/9.0/interactive/plpgsql-control-structures.html)
> there's an example using a cs_log function, which doesn't exist. I'm
> assuming this is supposed to be an example of a custom logging
> function someone might have, but it might cause less confusion if
> these were changed to RAISE calls, or something else that exists.
>
> What do you think?
Done, in the attached applied patch.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachments:/rtmp/raise.diff (text/x-diff, 1.1K) downloaddiff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgmlindex d0672bb..8da093b 100644--- a/doc/src/sgml/plpgsql.sgml+++ b/doc/src/sgml/plpgsql.sgml@@ -2169,21 +2169,20 @@ CREATE FUNCTION cs_refresh_mviews() RETURNS integer AS $$
DECLARE
mviews RECORD;
BEGIN
- PERFORM cs_log('Refreshing materialized views...');+ RAISE NOTICE 'Refreshing materialized views...';
FOR mviews IN SELECT * FROM cs_materialized_views ORDER BY sort_key LOOP
-- Now "mviews" has one record from cs_materialized_views
- PERFORM cs_log('Refreshing materialized view '- || quote_ident(mviews.mv_name) || ' ...');+ RAISE NOTICE 'Refreshing materialized view %s ...', quote_ident(mviews.mv_name);
EXECUTE 'TRUNCATE TABLE ' || quote_ident(mviews.mv_name);
EXECUTE 'INSERT INTO '
|| quote_ident(mviews.mv_name) || ' '
|| mviews.mv_query;
END LOOP;
- PERFORM cs_log('Done refreshing materialized views.');+ RAISE NOTICE 'Done refreshing materialized views.';
RETURN 1;
END;
$$ LANGUAGE plpgsql;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, thom@linux.com
Subject: Re: Non-existent cs_log function
In-Reply-To: <201103111348.p2BDm5u13846@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox