Ticket #7600 (new defect)
[PATCH] Trac does not send object names in quotes to PostgreSQL
| Reported by: | devrim@… | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11.3 |
| Component: | general | Version: | 0.12dev |
| Severity: | normal | Keywords: | postgresql |
| Cc: | felix.schwarz@… |
Description
Hello,
If we create an environment with a dash sign in it, Trac fails to authenticate from PostgreSQL. The reason is that within PostgreSQL, object names cannot have - in it:
test=# CREATE TEMP TABLE t-1 (c1 int); ERROR: syntax error at or near "-" LINE 1: CREATE TEMP TABLE t-1 (c1 int);
If you want to use dash, you need to double quote object name:
test=# CREATE TEMP TABLE "t-1" (c1 int); CREATE TABLE
This is not a bug -- this is a feature. So trac needs to send all object names in double quotes to PostgreSQL.
Regards, Devrim
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


