dbTalk Databases Forums  

Re: [NOVICE] Missing data in Information Schema

mailing.database.pgsql-novice mailing.database.pgsql-novice


Discuss Re: [NOVICE] Missing data in Information Schema in the mailing.database.pgsql-novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [NOVICE] Missing data in Information Schema - 11-02-2005 , 12:29 PM






George Weaver <gweaver (AT) shaw (DOT) ca> writes:
Quote:
This morning while trying to generate a file of metadata I found that =
most of the views in Information_Schema are empty, for example =
referential_constraints, table_constraints, etc.
The information_schema is mostly restricted to show you info about
objects you own --- if you run your test as a superuser, do you get
more info?

(This behavior is per SQL:1999. We recently noticed that SQL:2003 seems
to be laxer and allow you to see info about objects you can access, not
just those you own. We'll probably fix PG 8.2 to follow that behavior,
but it's too late for 8.1.)

regards, tom lane

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

http://www.postgresql.org/docs/faq


Reply With Quote
  #2  
Old   
George Weaver
 
Posts: n/a

Default Re: [NOVICE] Missing data in Information Schema - 11-02-2005 , 01:23 PM






----- Original Message -----
From: "Tom Lane" <tgl (AT) sss (DOT) pgh.pa.us>
To: "George Weaver" <gweaver (AT) shaw (DOT) ca>
Cc: <pgsql-novice (AT) postgresql (DOT) org>
Sent: Wednesday, November 02, 2005 12:23 PM
Subject: Re: [NOVICE] Missing data in Information Schema


Quote:
George Weaver <gweaver (AT) shaw (DOT) ca> writes:
This morning while trying to generate a file of metadata I found that =
most of the views in Information_Schema are empty, for example =
referential_constraints, table_constraints, etc.

The information_schema is mostly restricted to show you info about
objects you own --- if you run your test as a superuser, do you get
more info?
I was logged in as a superuser (postgres). Most of the schema were owned by
postgres but some containing stored functions were not, and most of the
tables in the public schema were owned by another user. Based on your
comments, I dumped the database with the No Owner option and restored it to
a test database logged in as postgres. All the objects in the test database
are owned by postgres and now the views in information_schema are showing
the expected information.

Thanks for your (prompt) help, Tom.

George

Quote:
(This behavior is per SQL:1999. We recently noticed that SQL:2003 seems
to be laxer and allow you to see info about objects you can access, not
just those you own. We'll probably fix PG 8.2 to follow that behavior,
but it's too late for 8.1.)

regards, tom lane



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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.