| From: | Jan Wieck <janwieck(at)Yahoo(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: is_view seems unnecessarily slow |
| Date: | 2001-01-08 18:05:41 |
| Message-ID: | 200101081805.NAA08383@jupiter.jw.home |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> backend/commands/command.c has a routine is_view() that tests for
> view-ness by scanning pg_rewrite (all of it) to see if the given
> relation has any ON SELECT rules.
>
> This is only used to disallow AlterTableAddConstraint and
> LockTableCommand on views. While I don't care much about the
> performance of AlterTableAddConstraint, it does bug me that this
> might slow down LOCK TABLE a good deal.
>
> Any objection to replacing this routine by a test for relkind = VIEW?
No objections.
These checks came from the days where views still had relkind
'r' and looking up pg_rewrite was the only way to know.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Wieck | 2001-01-08 18:37:04 | Re: Should heap_update/heap_delete hold buffer locks while toasting? |
| Previous Message | Tom Lane | 2001-01-08 17:21:38 | Re: Quite strange crash |