related charm name should be escaped before use as db name

Bug #893088 reported by Michael Nelson on 2011-11-21
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
postgresql (Juju Charms Collection)
Undecided
Mark Mims

Bug Description

Currently it seems that the related charm/relationship name is used verbatim as the database name, which causes errors as it's not necessarily something that postgres accepts:

http://paste.ubuntu.com/745066/

Michael Nelson (michael.nelson) wrote :

hazmat added a fix yesterday, which I've just tried out, but it seems it replaces only the first hyphen:

{{{
2011-11-22 08:14:18,542 unit:postgresql/7: hook.output ERROR: ERROR: syntax error at or near "-"
LINE 1: grant all privileges on database apache_django-wsgi to apach...
}}}

(note: my charm is currently named apache-django-wsgi)

Michael Nelson (michael.nelson) wrote :

fwiw, there are a bunch of other errors being reported by the hook, but I've not checked if they're just fall-out: http://paste.ubuntu.com/745665/

Mark Mims (mark-mims) on 2011-11-22
Changed in postgresql (juju Charms Collection):
status: New → Fix Committed
assignee: nobody → Mark Mims (mark-mims)
Stuart Bishop (stub) on 2013-07-08
Changed in postgresql (Juju Charms Collection):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers