Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: information...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3442 of 3799
Post > Topic >>

Re: information_schema.referential_constraints permissions

by tgl@[EMAIL PROTECTED] (Tom Lane) Apr 28, 2008 at 07:14 PM

"Lodewijk Voege" <lvoege@[EMAIL PROTECTED]
> writes:
> I have some code that gets foreign key information from
> information_schema.referential_constraints. I was puzzled about why it
wasn't
> returning anything for a while, until I read the information_schema.sql
file
> and the do***entation carefully: it has a pg_has_role(c.relowner,
'USAGE') in
> it and the do***entation states "The view referential_constraints
contains all
> referential integrity (foreign key) constraints in the current database
that
> belong to a table owned by a currently enabled role".

> Fair enough. But then I read the public draft of SQL 2003 and 200n on
this
> view, and it speaks only of "tables in this catalog that are accessible
to a
> given user or role", rather than owner****p. the user I was working with
most
> definately had access.

The SQL committee changed that recently --- SQL92 and SQL99 define the
view as

         Identify the referential constraints defined in this catalog that
         are owned by a given user.

I don't think we've gotten around to trying to sync information_schema
with SQL2003.  (The whole concept that information_schema might be a
moving target is pretty disturbing :-()

			regards, tom lane

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 2 Posts in Topic:
information_schema.referential_constraints permissions
lvoege@[EMAIL PROTECTED]   2008-04-28 17:47:59 
Re: information_schema.referential_constraints permissions
tgl@[EMAIL PROTECTED] (T  2008-04-28 19:14:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 22:33:23 CST 2008.