pgrowlocks relkind check

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pgrowlocks relkind check
Date: 2017-04-11 08:01:09
Message-ID: 370b6d10-24d1-fd17-c74b-f4e44fa052ea@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The following commit added relkind checks to certain contrib modules so
that a more user-friendly error is produced if the wrong kind of relation
is passed to its functions:

commit c08d82f38ebf763b79bd43ae34b7310ee47aaacd
Author: Stephen Frost <sfrost(at)snowman(dot)net>
Date: Thu Mar 9 16:34:25 2017 -0500

Add relkind checks to certain contrib modules

But it missed pgrowlocks, so the following happens:

create extension pgrowlocks;
create view one as select 1;
select pgrowlocks('one');
-- ERROR: could not open file "base/68730/68748": No such file or directory

With the attached patch:

select pgrowlocks('one');
ERROR: "one" is not a table, index, materialized view, sequence, or TOAST
table

Thanks,
Amit

Attachment Content-Type Size
0001-Add-relkind-check-to-pgrowlocks.patch text/x-diff 1.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2017-04-11 08:05:27 Re: [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Previous Message Masahiko Sawada 2017-04-11 07:50:40 Re: max_sync_workers_per_subscription is missing in postgresql.conf