Re: [HACKERS] pg_dump roles support

2009-01-05 Thread Tom Lane
=?ISO-8859-1?Q?Benedek_L=E1szl=F3?= l...@benedekl.tvnetwork.hu writes: Here is an updated patch, which deals with 's in the rolename. Committed with revisions as per subsequent discussion: pg_restore has its own switch and there's no change in archive contents. regards,

Re: [HACKERS] pg_dump roles support [Review]

2008-12-31 Thread Tom Lane
[ starting to examine this patch now... ] =?UTF-8?B?QmVuZWRlayBMw6FzemzDsw==?= l...@benedekl.tvnetwork.hu writes: I also need some feedback about the role support in pg_restore (not implemented yet). Currently pg_restore sets the role during the restore process according to the TOC entry in

Re: [HACKERS] pg_dump roles support [Review]

2008-12-31 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: --role switch for pg_dump and pg_dumpall: sets the role used while dumping, has no effect on the emitted archive. --role switch for pg_restore: sets the role used while restoring, if it's to be different from what -U says. As one of the original

Re: [HACKERS] pg_dump roles support [Review]

2008-12-20 Thread Abhijit Menon-Sen
Hi Benedek. At 2008-11-06 15:08:14 +0100, l...@benedekl.tvnetwork.hu wrote: I created an updated patch according to your notices. I had a look at your updated patch, and it looks fine. I fiddled with the documentation a little, and fixed up one place where the code had drifted and the patch

Re: [HACKERS] pg_dump roles support

2008-11-13 Thread Benedek László
On 2008-11-08 09:25, Benedek László wrote: Does this work if the role name contains a ' ? Right, this one fails with ' in the role name. An update coming soon closing this issue. Here is an updated patch, which deals with 's in the rolename. Please review. doc/src/sgml/ref/pg_dump.sgml

Re: [HACKERS] pg_dump roles support [Review]

2008-11-10 Thread Ibrar Ahmed
On Thu, Nov 6, 2008 at 8:08 PM, Benedek László [EMAIL PROTECTED] wrote: Hi, Thanks for your review. I created an updated patch according to your notices. 1 - Patch does not apply cleanly on latest git repository, although there is no hunk failed but there are some hunk succeeded messages.

Re: [HACKERS] pg_dump roles support

2008-11-08 Thread Benedek László
Hi, Thank you for your review. On 2008-11-07 21:20, Alvaro Herrera wrote: The patch contains the following things: - pg_dump and pg_dumpall accepts the --role=rolename parameter, and sends a SET ROLE command on their connections Minor comment -- I think you need to quote the role

Re: [HACKERS] pg_dump roles support

2008-11-07 Thread Alvaro Herrera
Benedek László wrote: Hi, The patch contains the following things: - pg_dump and pg_dumpall accepts the --role=rolename parameter, and sends a SET ROLE command on their connections Minor comment -- I think you need to quote the role name in the SET command. Otherwise roles with funny

Re: [HACKERS] pg_dump roles support [Review]

2008-11-06 Thread Benedek László
Hi, Thanks for your review. I created an updated patch according to your notices. 1 - Patch does not apply cleanly on latest git repository, although there is no hunk failed but there are some hunk succeeded messages. Rebased to the current HEAD. 2- Patch contains unnecessary spaces and

[HACKERS] pg_dump roles support [Review]

2008-11-05 Thread Ibrar Ahmed
Just a superficial review. I haven't really looked hard at this yet. 1 - Patch does not apply cleanly on latest git repository, although there is no hunk failed but there are some hunk succeeded messages. 2- Patch contains unnecessary spaces and tabs which makes the patch unnecessarily big.

Re: [HACKERS] pg_dump roles support

2008-10-11 Thread Benedek László
Hello All, in my last mail http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg114835.html I have sent you a patch of pg_dump and pg_dumpall --role option support. Nobody replied or commented jet so now I send it again. The attached patch is the same as the last one, except it is

Re: [HACKERS] pg_dump roles support

2008-09-24 Thread Benedek László
Hello, I modified my previous patch supporting the --role option in pg_dump and pg_dumpall. The attached patch contains the following things: - pg_dump and pg_dumpall accepts the --role=rolename parameter, and sends a SET ROLE command on their connections - pg_dumpall passes this option to

Re: [HACKERS] pg_dump roles support

2008-09-04 Thread Benedek László
Tom Lane wrote: Some other review nitpicking: Thank you for your review. I really need all suggestions, since I never posted any patch to the community before. The next patch will emit the SET ROLE command in the generated dump, as you and Stephen said. This will fit in my workflow too,

Re: [HACKERS] pg_dump roles support

2008-09-03 Thread Tom Lane
=?ISO-8859-1?Q?Benedek_L=E1szl=F3?= [EMAIL PROTECTED] writes: pg_dumpall now just passes the --role option to pg_dump. What do you think, is it enough or it should issue the SET ROLE TO ... command in its own session too? I think it would have to, in the general case. Consider the

Re: [HACKERS] pg_dump roles support

2008-09-03 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: =?ISO-8859-1?Q?Benedek_L=E1szl=F3?= [EMAIL PROTECTED] writes: pg_dumpall now just passes the --role option to pg_dump. What do you think, is it enough or it should issue the SET ROLE TO ... command in its own session too? I think it would have to,

Re: [HACKERS] pg_dump roles support

2008-08-27 Thread Benedek László
Hello, daveg wrote: I created a patch to set the role to a specified name just after the db connection. I was going to do this, but you have beat me to it. You will want to update the sgml documentation, and pg_dumpall as well. -dg Ok, here is the next one. pg_dumpall now just

Re: [HACKERS] pg_dump roles support

2008-08-26 Thread Benedek László
Hello, Stephen Frost wrote: As I discuss above, it'd be really nice have a --role or similar option to ask pg_dump to set role to a particular user before dumping the database. I created a patch to set the role to a specified name just after the db connection. Please review it for possible

Re: [HACKERS] pg_dump roles support

2008-05-25 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: Discussing psql options made me recall an annoying problem that we've run into. There's no way (unless it was added to 8.3 and I missed it, but I don't think so) to tell pg_dump 'switch to this role before doing anything else'. That's very frustrating

Re: [HACKERS] pg_dump roles support

2008-05-22 Thread Stephen Frost
Greetings, * Stephen Frost ([EMAIL PROTECTED]) wrote: Discussing psql options made me recall an annoying problem that we've run into. There's no way (unless it was added to 8.3 and I missed it, but I don't think so) to tell pg_dump 'switch to this role before doing anything else'.

[HACKERS] pg_dump roles support

2007-12-10 Thread Stephen Frost
Greetings, Discussing psql options made me recall an annoying problem that we've run into. There's no way (unless it was added to 8.3 and I missed it, but I don't think so) to tell pg_dump 'switch to this role before doing anything else'. That's very frustrating when you use no-inherit

Re: [HACKERS] pg_dump roles support

2007-12-10 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: create role admin with noinherit; grant postgres to admin; grant admin to joesysadmin; pg_dump -U joesysadmin mydb; Fails because joesysadmin hasn't got rights to everything directly. Seems like the correct answer to that is use a saner

Re: [HACKERS] pg_dump roles support

2007-12-10 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: Stephen Frost [EMAIL PROTECTED] writes: create role admin with noinherit; grant postgres to admin; grant admin to joesysadmin; pg_dump -U joesysadmin mydb; Fails because joesysadmin hasn't got rights to everything directly. Seems

Re: [HACKERS] pg_dump roles support

2007-12-10 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: * Tom Lane ([EMAIL PROTECTED]) wrote: Seems like the correct answer to that is use a saner role configuration. Far as I can tell anyway. What would you suggest? The point here is that joesysadmin shouldn't get full postgres privs on login since most

Re: [HACKERS] pg_dump roles support

2007-12-10 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: Stephen Frost [EMAIL PROTECTED] writes: Far as I can tell anyway. What would you suggest? The point here is that joesysadmin shouldn't get full postgres privs on login since most of the time he won't need them. It's sane to set up a manually-used