Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning PostgreSQL

You're reading from  Learning PostgreSQL

Product type Book
Published in Nov 2015
Publisher Packt
ISBN-13 9781783989188
Pages 464 pages
Edition 1st Edition
Languages

Table of Contents (21) Chapters

Learning PostgreSQL
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Relational Databases 2. PostgreSQL in Action 3. PostgreSQL Basic Building Blocks 4. PostgreSQL Advanced Building Blocks 5. SQL Language 6. Advanced Query Writing 7. Server-Side Programming with PL/pgSQL 8. PostgreSQL Security 9. The PostgreSQL System Catalog and System Administration Functions 10. Optimizing Database Performance 11. Beyond Conventional Data types 12. Testing 13. PostgreSQL JDBC 14. PostgreSQL and Hibernate Index

PostgreSQL default access privileges


By default, PostgreSQL users—also known as roles with login option—can access the public schema. Also, note that the default PostgreSQL authentication policy allows users to access all databases from the localhost using peer authentication on a Linux system. Also, a user can create objects in the public schema of any database he/she can access; for example, the user can create a function and execute it in the public schema. In addition to this, the user can alter some settings.

The user cannot access other user objects in the public schema or create databases and schemas. However, the user can sniff data about the database objects by querying the system catalog. Unprivileged users can get information about other users, table structure, table owner, some table statistics, and so on. The following example shows how the user test is able to get information about table a, which is owned by a postgres user:

test=> SELECT * FROM a;
ERROR:  permission denied...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}