Re: Modifying pg_shadow? - Mailing list pgsql-novice

From Jason Hihn
Subject Re: Modifying pg_shadow?
Date
Msg-id NGBBLHANMLKMHPDGJGAPGENBCMAA.jhihn@paytimepayroll.com
Whole thread Raw
In response to Re: Modifying pg_shadow?  (Oliver Fromme <olli@lurza.secnetix.de>)
Responses Re: Modifying pg_shadow?
Re: Modifying pg_shadow?
List pgsql-novice

> -----Original Message-----
> From: Oliver Fromme [mailto:olli@lurza.secnetix.de]
> Sent: Tuesday, September 09, 2003 9:37 AM
> To: Jason Hihn
> Cc: Tom Lane; pgsql-novice@postgresql.org
> Subject: Re: [NOVICE] Modifying pg_shadow?
>
>
>
> Jason Hihn wrote:
>  > Tom Lane wrote:
>  >
>  > > > How do I back up the pg_ system tables?
>  > >
>  > > They aren't backed up as such; all the useful content is
> included in the
>  > > schema information output by pg_dump or pg_dumpall.
>  >
>  > What database name should pg_dump be given? This is a horrid
> omission from
>  > the online docs! Furthermore, there is also no system database
> listed in
>  > pg_database.
>
> I think "pg_dumpall -g" is what you want.  That _is_ in the
> online docs.

> However, I agree that restoring a complete PG cluster from
> scratch seems to be somewhat difficult.  You still have to
> do a lot of things manually in order to get everything right
> without missing anything.  At least that's my impression.
>
"Chapter 9. Backup and Restore":
pg_dump dbname > outfile

What's the dbname for the system tables? The -g option of pg_dumpall only
does users and groups. No other tables. (Eek!)

>
> I think you might want to look at the relacl column of the
> pg_class table.

Ah, wonderful. This is what I was looking for. Though in the past I've used
databases where I wouldn't have to parse this text. It was quite easy and
fun to work with as tuple data. *wink*

Ok, so I have a question If I have 2 databases, a and b, and they both have
a table, c, how do I grant permissions only to table a.t and not both tables
in both databases at the same time? The intituve answer is not correct -
that 'ON a.t ...' does not work.

> However, in your case, it might be beneficial to store the
> data about users in your own database, in a format which is
> suitable for your use.  You can then generate grant/revoke
> commands from that if necessary.  It would also be a lot
> more portable than depending on the internal structure of
> PG system tables.

I really don't want to have to re-invent the wheel here.

Thank you for your help, I'm headed in the right direction now.


pgsql-novice by date:

Previous
From: Oliver Fromme
Date:
Subject: Re: Modifying pg_shadow?
Next
From: Bruce Momjian
Date:
Subject: Re: Modifying pg_shadow?