OSDN Git Service

Fix exception messages.
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 17 Nov 2014 09:03:30 +0000 (18:03 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 17 Nov 2014 09:05:28 +0000 (18:05 +0900)
Exception messages in definitions of dbms_stats.restore(bid, relname,
colname) were incorrect. This causes incomprehensive message like this,

ERROR:  too many parameters specified for RAISE

There's no harm other than the bogus message.

ext_scripts/pg_dbms_stats--1.3.4--1.3.5-9.1.sql
ext_scripts/pg_dbms_stats--1.3.4--1.3.5-9.2.sql
ext_scripts/pg_dbms_stats--1.3.4--1.3.5-9.3.sql
ext_scripts/pg_dbms_stats--1.3.4--1.3.5-9.4.sql
ext_scripts/pg_dbms_stats--1.3.5-9.1.sql
ext_scripts/pg_dbms_stats--1.3.5-9.2.sql
ext_scripts/pg_dbms_stats--1.3.5-9.3.sql
ext_scripts/pg_dbms_stats--1.3.5-9.4.sql

index 959852c..c710d20 100644 (file)
@@ -120,7 +120,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r
index e7289e8..6feb5ec 100644 (file)
@@ -112,7 +112,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r
index 745f334..485e642 100644 (file)
@@ -113,7 +113,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r
index 745f334..485e642 100644 (file)
@@ -113,7 +113,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r
index d9e636b..6e51e18 100644 (file)
@@ -492,7 +492,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r
index 38726b7..146befd 100644 (file)
@@ -522,7 +522,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r
index 925d8e0..9707beb 100644 (file)
@@ -522,7 +522,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r
index 9236828..650725b 100644 (file)
@@ -522,7 +522,7 @@ BEGIN
                                RAISE EXCEPTION 'column "%" not found in relation %', $3, $2;
             END IF;
             IF NOT EXISTS(SELECT * FROM dbms_stats.column_stats_backup WHERE id <= $1 AND starelid = $2 AND staattnum = set_attnum) THEN
-                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before',$3, $2, $1;
+                RAISE EXCEPTION 'statistics of column "%" of relation "%" are not found in any backups before backup id = %',$3, $2, $1;
             END IF;
         END IF;
                PERFORM * FROM dbms_stats.relation_stats_locked r