postgresql/src/include/commands
Joe Conway 344703bcc4 Disallow converting a table to a view if row security is present.
When DefineQueryRewrite() is about to convert a table to a view, it checks
the table for features unavailable to views.  For example, it rejects tables
having triggers.  It omits to reject tables having relrowsecurity or a
pg_policy record. Fix that. To faciliate the repair, invent
relation_has_policies() which indicates the presence of policies on a
relation even when row security is disabled for that relation.

Reported by Noah Misch. Patch by me, review by Stephen Frost. Back-patch
to 9.5 where RLS was introduced.
2015-07-28 16:24:09 -07:00
..
alter.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
async.h Introduce and use infrastructure for interrupt processing during client reads. 2015-02-03 22:25:20 +01:00
cluster.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
collationcmds.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
comment.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
conversioncmds.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
copy.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
createas.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
dbcommands.h Move WAL-related definitions from dbcommands.h to separate header file. 2015-03-09 15:50:49 +02:00
dbcommands_xlog.h Move WAL-related definitions from dbcommands.h to separate header file. 2015-03-09 15:50:49 +02:00
defrem.h Fix DDL command collection for TRANSFORM 2015-06-26 18:17:54 -03:00
discard.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
event_trigger.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
explain.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
extension.h Allow on-the-fly capture of DDL event details 2015-05-11 19:14:31 -03:00
lockcmds.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
matview.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
policy.h Disallow converting a table to a view if row security is present. 2015-07-28 16:24:09 -07:00
portalcmds.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
prepare.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
proclang.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
schemacmds.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
seclabel.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
sequence.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
tablecmds.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
tablespace.h Be more conservative about removing tablespace "symlinks". 2015-06-26 15:53:13 -04:00
trigger.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
typecmds.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
user.h Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
vacuum.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
variable.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
view.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00