1. 14 May, 2014 1 commit
  2. 12 Mar, 2014 1 commit
  3. 24 Feb, 2014 1 commit
  4. 07 Feb, 2014 1 commit
  5. 03 Feb, 2014 1 commit
  6. 04 Jan, 2014 1 commit
    • Fix postgresql_user to understand PG namespaces · 7a860838
      Previously postgresql_user quoted user supplied identifers to create
      grant statements that look like this:
      
          GRANT SELECT on "tablename" to "user";
      
      Which only works if the tablename is not in a namespace.  If you supply
      a namespaced tabelname like "report.revenue" then it creates this
      incorrect statement:
      
          GRANT SELECT on "report.revenue" to "user";
      
      Which will not find the "revenue" table in the "report" namespace, but
      will rather look for a table named "report.revenue" in the current
      (default public) namespace.  The correct form is:
      
          GRANT SELECT on "report"."revenue" to "user";
      
      This approach could have the unfortunate effect that code that
      previously relied on the other behavior to grant privileges on tables
      with periods in their names may now break.  PostgreSQL users
      typically shouldn't name tables as such, and users can still access the
      old behavior and use tablenames with periods in the if they must by
      supplying their own quoting.
      Alan Fairless committed
  7. 31 Dec, 2013 1 commit
  8. 05 Dec, 2013 2 commits
  9. 02 Dec, 2013 2 commits
  10. 28 Nov, 2013 2 commits
  11. 14 Nov, 2013 1 commit
  12. 03 Nov, 2013 1 commit
  13. 26 Oct, 2013 3 commits
  14. 15 Jun, 2013 1 commit
  15. 01 Jun, 2013 1 commit
  16. 28 Apr, 2013 1 commit
  17. 08 Apr, 2013 1 commit
  18. 01 Apr, 2013 1 commit
  19. 27 Feb, 2013 1 commit
  20. 24 Feb, 2013 1 commit
  21. 20 Feb, 2013 1 commit
  22. 19 Feb, 2013 2 commits
  23. 05 Jan, 2013 1 commit
  24. 04 Jan, 2013 1 commit
  25. 05 Dec, 2012 1 commit
  26. 21 Nov, 2012 1 commit
  27. 19 Nov, 2012 1 commit
  28. 31 Oct, 2012 1 commit
  29. 23 Oct, 2012 1 commit
  30. 20 Oct, 2012 1 commit
  31. 15 Oct, 2012 1 commit
  32. 30 Sep, 2012 1 commit
  33. 29 Sep, 2012 1 commit
  34. 07 Sep, 2012 1 commit
    • Fix postgresql_user bug · b3b01bb7
      If I create a database from scratch and assign permissions by doing:
      
            - name: ensure database is created
              action: postgresql_db db=$dbname
      
            - name: ensure django user has access
              action: postgresql_user db=$dbname user=$dbuser priv=ALL password=$dbpassword
      
      Then it fails with the error:
      
        File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 565, in <module>
          main()
        File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 273, in main
          changed = grant_privileges(cursor, user, privs) or changed
        File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 174, in grant_privileges
          changed = grant_func(cursor, user, name, privilege)\
        File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 132, in grant_database_privilege
          prev_priv = get_database_privileges(cursor, user, db)
        File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 118, in get_database_privileges
          r = re.search('%s=(C?T?c?)/[a-z]+\,?' % user, datacl)
        File "/usr/lib/python2.7/re.py", line 142, in search
          return _compile(pattern, flags).search(string)
      TypeError: expected string or buffer
      
      This fix fixes the problem by not executing the regex if the
      db query on pg_database returns None.
      Lorin Hochstein committed