From 2034086ed11f003a3406709c6e90256548a0cdca Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 9 Oct 2001 04:55:11 +0000 Subject: [PATCH] Correct some errors in plpgsql examples, as reported by Junichi Kobayasi. --- doc/src/sgml/plsql.sgml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/plsql.sgml b/doc/src/sgml/plsql.sgml index d7f1b99d1b..6dd155090f 100644 --- a/doc/src/sgml/plsql.sgml +++ b/doc/src/sgml/plsql.sgml @@ -1,5 +1,5 @@ @@ -519,8 +519,8 @@ create function cs_refresh_one_mv(integer) returns integer as ' -- The mv_name column of cs_materialized_views stores view -- names. - TRUNCATE TABLE table_data.mv_name; - INSERT INTO table_data.mv_name || '' '' || table_data.mv_query; + EXECUTE ''TRUNCATE TABLE '' || quote_ident(table_data.mv_name); + EXECUTE ''INSERT INTO '' || quote_ident(table_data.mv_name) || '' '' || table_data.mv_query; return 1; end; @@ -1151,7 +1151,7 @@ END LOOP; FOR i IN 1..10 LOOP -- some expressions here - RAISE NOTICE 'i is %',i; + RAISE NOTICE ''i is %'',i; END LOOP; FOR i IN REVERSE 1..10 LOOP @@ -1304,9 +1304,9 @@ BEGIN -- Now "mviews" has one record from cs_materialized_views - PERFORM cs_log(''Refreshing materialized view '' || mview.mv_name || ''...''); - TRUNCATE TABLE mview.mv_name; - INSERT INTO mview.mv_name || '' '' || mview.mv_query; + PERFORM cs_log(''Refreshing materialized view '' || 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.''); -- 2.40.0