Print baserestrictinfo for varchar fields

From: Donald Dong <xdong(at)csumb(dot)edu>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Print baserestrictinfo for varchar fields
Date: 2019-05-30 00:33:59
Message-ID: 6843DC4A-FDFF-4A5C-BAA7-E8066EEEA3A7@csumb.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I noticed that debug_print_rel outputs "unknown expr" when the fields
in baserestrictinfo are typed as varchar.

create table tbl_a(id int, info varchar(32));

RELOPTINFO (tbl_a): rows=4 width=86
baserestrictinfo: unknown expr = pattern

My approach is to handle the RelabelType case in print_expr. After
the patch, I get:

RELOPTINFO (tbl_a): rows=4 width=86
baserestrictinfo: tbl_a.info = pattern

I wonder if this is a proper way of fixing it?

Thank you,
Donald Dong

Attachment Content-Type Size
001_print_baserestrictinfo_varchar.patch application/octet-stream 437 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Donald Dong 2019-05-30 01:21:46 undefined symbol: PQgssEncInUse
Previous Message Tom Lane 2019-05-29 22:39:36 Re: coverage increase for worker_spi