bucardo/dbdpg — pull request #6 by pilcrow (2014-06-11 04:12:53+00:00)
Title: Support for SYSTEM TABLE, SYSTEM VIEW types in table_info

Issue
---
`table_info` as an *object search* (`table_info('', '%', '%')`) returns SYSTEM TABLE and SYSTEM VIEW objects. However, it does _not_ support searching for these types of objects. Instead, a SYSTEM FOO type specifier matches a FOO object or a SYSTEM FOO object.

Related, `table_info` as a *type search* (`table_info('', '', '', '%')`) does not recognize the existence of SYSTEM TABLEs and SYSTEM VIEWs at all.

Proposed Resolution
---
This pull request modifies Pg.pm to:

1. Return SYSTEM TABLE and SYSTEM VIEW as _bona fide_ types known to `table_info('', '', '', '%')`
2. Permit explicit searching for these types which does not conflate with searching for plain TABLE and VIEW objects.

Additionally t/03dbmethod.t is modified to add a few test cases. In particular, we test
that all supported types are returned by the "type search":

not ok 97 - DB handle method "table_info" type inquiry returns all supported types

# Failed test 'DB handle method "table_info" type inquiry returns all supported types'
# at t/03dbmethod.t line 556.
# Structures begin differing at:
# $got->[0] = 'TABLE'
# $expected->[0] = 'SYSTEM TABLE'

(Of course that test passes with these changes.)