Connecting Tech Pros Worldwide Forums | Help | Site Map

Bug Report -- information schema view is broken 'unrecognized privilege type: "RERERENCES"'

Greg Stark
Guest
 
Posts: n/a
#1: Nov 23 '05

I haven't seen it mentioned, but I could have missed it. It seems like this
kind of thing must be known and probably fixed already? I'm actually still
using 7.4 beta 5. IIRC that was the last beta before the release and there
were no changes for 7.4.


db=> select table_name from information_schema.tables;
ERROR: unrecognized privilege type: "RERERENCES"

db=> \d information_schema.tables
View "information_schema.tables"
Column | Type | Modifiers
------------------------------+-----------------------------------+-----------
table_catalog | information_schema.sql_identifier |
table_schema | information_schema.sql_identifier |
table_name | information_schema.sql_identifier |
table_type | information_schema.character_data |
self_referencing_column_name | information_schema.sql_identifier |
reference_generation | information_schema.character_data |
user_defined_type_catalog | information_schema.sql_identifier |
user_defined_type_schema | information_schema.sql_identifier |
user_defined_name | information_schema.sql_identifier |
View definition:
SELECT current_database()::character varying::information_schema.sql_identifier AS table_catalog, nc.nspname::character varying::information_schema.sql_identifier AS table_schema, c.relname::character varying::information_schema.sql_identifier AS table_name,
CASE
WHEN nc.nspname ~~ like_escape('pg!_temp!_%'::text, '!'::text) THEN 'LOCAL TEMPORARY'::text
WHEN c.relkind = 'r'::"char" THEN 'BASE TABLE'::text
WHEN c.relkind = 'v'::"char" THEN 'VIEW'::text
ELSE NULL::text
END::information_schema.character_data AS table_type, NULL::information_schema.sql_identifier::informati on_schema.sql_identifier AS self_referencing_column_name, NULL::information_schema.character_data::informati on_schema.character_data AS reference_generation, NULL::information_schema.sql_identifier::informati on_schema.sql_identifier AS user_defined_type_catalog, NULL::information_schema.sql_identifier::informati on_schema.sql_identifier AS user_defined_type_schema, NULL::information_schema.sql_identifier::informati on_schema.sql_identifier AS user_defined_name
FROM pg_namespace nc, pg_class c, pg_user u
WHERE c.relnamespace = nc.oid AND u.usesysid = c.relowner AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char") AND (u.usename = "current_user"() OR has_table_privilege(c.oid, 'SELECT'::text) OR has_table_privilege(c.oid, 'INSERT'::text) OR has_table_privilege(c.oid, 'UPDATE'::text) OR has_table_privilege(c.oid, 'DELETE'::text) OR has_table_privilege(c.oid, 'RULE'::text) OR has_table_privilege(c.oid, 'RERERENCES'::text) OR has_table_privilege(c.oid, 'TRIGGER'::text));


Note the "RERERENCES" in the last line of the view definition.


--
greg


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


Tom Lane
Guest
 
Posts: n/a
#2: Nov 23 '05

re: Bug Report -- information schema view is broken 'unrecognized privilege type: "RERERENCES"'


Greg Stark <gsstark@mit.edu> writes:[color=blue]
> ... I'm actually still using 7.4 beta 5.[/color]

Naughty naughty.
[color=blue]
> db=> select table_name from information_schema.tables;
> ERROR: unrecognized privilege type: "RERERENCES"[/color]

Works for me in REL7_4 CVS tip. You could dig in the committers
archives or release notes to see when it was fixed.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Manfred Koizar
Guest
 
Posts: n/a
#3: Nov 23 '05

re: Bug Report -- information schema view is broken 'unrecognized privilege type: "RERERENCES"'


On 04 Jun 2004 01:31:05 -0400, Greg Stark <gsstark@mit.edu> wrote:[color=blue]
>using 7.4 beta 5. IIRC that was the last beta before the release and there
>were no changes for 7.4.[/color]

But there were changes between 7.4 and 7.4.2 ;-) And I believe that
this fix is one of them.
[color=blue]
>db=> \d information_schema.tables
> [...]
>Note the "RERERENCES" in the last line of the view definition.[/color]

This is fixed in current sources.

Servus
Manfred

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Greg Stark
Guest
 
Posts: n/a
#4: Nov 23 '05

re: Bug Report -- information schema view is broken 'unrecognized privilege type: "RERERENCES"'



Tom Lane <tgl@sss.pgh.pa.us> writes:
[color=blue]
> Greg Stark <gsstark@mit.edu> writes:[color=green]
> > ... I'm actually still using 7.4 beta 5.[/color]
>
> Naughty naughty.[/color]

Yeah, actually I didn't realize I was behind. I think I was behind because
Debian wanted to update perl in order to upgrade the perl pg driver and...
[color=blue][color=green]
> > db=> select table_name from information_schema.tables;
> > ERROR: unrecognized privilege type: "RERERENCES"[/color]
>
> Works for me in REL7_4 CVS tip. You could dig in the committers
> archives or release notes to see when it was fixed.[/color]

Anyways, I just updated and it's gone, but since I had already fixed the view
definition before upgrading that doesn't really prove anything.

7.4.1 does say:

* Fix information schema view constraint_column_usage for foreign
keys (Peter)

Which I presume covered this.

--
greg


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Closed Thread