dbTalk Databases Forums  

[BUGS] BUG #1248: pg_dump produces grants with concatonated elements

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1248: pg_dump produces grants with concatonated elements in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1248: pg_dump produces grants with concatonated elements - 09-08-2004 , 04:50 PM







The following bug has been logged online:

Bug reference: 1248
Logged by: Timothy LoGrasso

Email address: timlograsso (AT) yahoo (DOT) com

PostgreSQL version: 7.3.5

Operating system: SunOS 5.9

Description: pg_dump produces grants with concatonated elements

Details:

pg_dump produces the following grants:
GRANT INSERTSELECTUPDATE ON TABLE camp_score TO mn;

Obviously there are no commas or spaces seperating the different privs. I'm
actually running the following version: PostgreSQL 7.3.6 on
i386-pc-solaris2.8, compiled by cc -fast -xarch=386 -Xa

Attached is the ddl to create the table and grant permissions.

CREATE USER mn PASSWORD 'mn';
CREATE USER mnview PASSWORD 'mnview';
CREATE USER mgr PASSWORD 'mgr';
CREATE USER mndb PASSWORD 'mndb';

CREATE TABLE camp_score (
ipr_number character varying(15) NOT NULL,
performed_by character(6),
score_date date,
hs_comp smallint,
hs_tech smallint,
hs_hyg smallint,
hs_safe smallint,
hs_fire smallint,
hs_hp smallint,
hs_crit smallint,
hs_infr smallint,
ew_comp smallint,
ew_tech smallint,
ew_liq smallint,
ew_sol smallint,
ew_air smallint,
ew_min smallint,
ew_rest smallint,
ew_corr smallint,
ew_infr smallint,
ss_comp smallint,
ss_tech smallint,
ss_snm_acc smallint,
ss_snm_prot smallint,
ss_class_prot smallint,
ss_prop_prot smallint,
ss_hostile_prot smallint,
ss_infr smallint,
mi_comp smallint,
mi_tech smallint,
mi_bb smallint,
mi_mission smallint,
mi_asset smallint,
mi_natl smallint,
mi_infr smallint
);


--
-- TOC entry 8 (OID 37311)
-- Name: camp_score; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE camp_score FROM PUBLIC;
GRANT INSERT, SELECT, UPDATE ON TABLE camp_score TO mn;
GRANT ALL ON TABLE camp_score TO mndb;
GRANT SELECT ON TABLE camp_score TO mgr;
GRANT INSERT, SELECT, UPDATE ON TABLE camp_score TO mnview;



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1248: pg_dump produces grants with concatonated elements - 09-08-2004 , 05:20 PM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
pg_dump produces the following grants:
GRANT INSERTSELECTUPDATE ON TABLE camp_score TO mn;
Doesn't happen for anybody else...

Quote:
Obviously there are no commas or spaces seperating the different privs. I'm
actually running the following version: PostgreSQL 7.3.6 on
i386-pc-solaris2.8, compiled by cc -fast -xarch=386 -Xa
I'm wondering about a buggy compiler. The code involved is much too
simple to be broken: it's repeated calls to this:

static void
AddAcl(char *aclbuf, const char *keyword)
{
if (*aclbuf)
strcat(aclbuf, ",");
strcat(aclbuf, keyword);
}

If *aclbuf contains zero on entry, then why isn't the strcat overwriting
instead of appending? Looks like a compiler bug to me. What is "-fast"
and does the problem go away if you don't use it?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


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 - 2012, Jelsoft Enterprises Ltd.