Re: [HACKERS] pgrowlocks relkind check - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] pgrowlocks relkind check
Date
Msg-id 20170411131706.GR9812@tamriel.snowman.net
Whole thread Raw
In response to [HACKERS] pgrowlocks relkind check  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [HACKERS] pgrowlocks relkind check  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
Amit,

* Amit Langote (Langote_Amit_f8@lab.ntt.co.jp) wrote:
> 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@snowman.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

Good point.

Thanks, I'll see about committing this shortly.

Stephen

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] src/interfaces/libpq shipping nmake-related Makefiles
Next
From: Heikki Linnakangas
Date:
Subject: Re: [HACKERS] Some thoughts about SCRAM implementation