Re: [gnome-db] "ALTER USER", etc, with GdaSqlBuilder?



On Thu, 2010-05-20 at 22:48 +0200, Vivien Malerba wrote:
> Here is a patch implementing the CREATE USER operation for PostgreSQL
> (done in 30'). If you find it usefull I'll add the other operations
> for users as well before a 4.1.6. You can test it with the
> libgda-ui/demos/gdaui-demo-4.0 and the "DDL queries" demo item.

This seems to just support the equivalent (in PostgreSQL) of 
  CREATE USER someusername
but for Glom I need
  CREATE USER someusername "PASSWORD" 'somepassword'
(well that's the weird quoting that I find in my Glom code right now.)
and 
  CREATE USER someusername PASSWORD somepassword SUPERUSER CREATEDB
CREATEROLE


I also use:
  DROP USER someuser
  ALTER GROUP somegroup ADD USER someuser
  ALTER GROUP somegroup DROP USER someuser
  REVOKE ALL PRIVILEGES ON sometable FROM someuser
  GRANT ALL PRIVILEGES ON sometable TO GROUP
  GRANT SELECT UPDATE INSERT DELETE ON sometable TO GROUP
  (sometimes omitting some of SELECT, UPDATE, INSERT, or DELETE)
  (or REVOKE .. FROM versions of the GRANTS)

(Note that USER and GROUP are "obsolete" now in PostgreSQL, replaced by
ROLE:
http://www.postgresql.org/docs/8.4/static/sql-altergroup.html
But I _guess_ that USER and GROUP are probably still the generic
concepts shared by other database servers.)

I'm thankful for any effort you make on this. I might get around to it
eventually if you don't find the time.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]