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 Interfaces Pgadmin Hackers > Format for Gran...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 4509 of 4681
Post > Topic >>

Format for Grants to Roles

by Jon.Roberts@[EMAIL PROTECTED] ("Roberts, Jon") May 1, 2008 at 09:18 AM

Our naming standard here is first_name.last_name so my username at work
is jon.roberts.  When I look at the DDL script created by pgAdmin, it
doesn't format my name properly for the grants.  It does format it
properly for the owner.


Example:

-- Table: jon.part_test

-- DROP TABLE jon.part_test;

CREATE TABLE jon.part_test
(
  id integer NOT NULL,
  first_name character varying(30) NOT NULL,
  last_name character varying(50) NOT NULL,
  address_1 character varying(100) NOT NULL,
  address_2 character varying(100),
  city character varying(50) NOT NULL,
  state character varying(2) NOT NULL,
  zip character varying(10) NOT NULL,
  load_date date NOT NULL,
  load_timestamp_with_timezone timestamp with time zone NOT NULL,
  load_timestamp_without_timezone timestamp without time zone NOT NULL,
  CONSTRAINT part_test_pkey PRIMARY KEY (id)
)
WITH (OIDS=3DFALSE);
ALTER TABLE jon.part_test OWNER TO "jon.roberts";
GRANT ALL ON TABLE jon.part_test TO "\""jon.roberts\""";
GRANT SELECT ON TABLE jon.part_test TO dev;


This is incorrect:
GRANT ALL ON TABLE jon.part_test TO "\""jon.roberts\""";

This is correct:
GRANT ALL ON TABLE jon.part_test TO "jon.roberts";

Executing this incorrect line fails with this:
ERROR:  role "\"jon.roberts\"" does not exist

********** Error **********

ERROR: role "\"jon.roberts\"" does not exist
SQL state: 42704



Jon

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




 2 Posts in Topic:
Format for Grants to Roles
Jon.Roberts@[EMAIL PROTEC  2008-05-01 09:18:52 
Re: Format for Grants to Roles
dpage@[EMAIL PROTECTED]   2008-05-01 20:37:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan13V112 Wed Jul 9 0:08:51 CDT 2008.