Posted by gatoth on November 4, 2009 at 8:21am
| Project: | Page Title |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
In PostgreSQL, queries strings have to be enclosed in apostrophes ('), quotation mark (") does not work. Please fix it.
Thanx,
Gabor
Comments
#1
People, please!
The world is not stuck to mysql :)
Please find attached patch against 6.x-2.3
#2
FWIW, I just applied the patch to a new install using 6.x-2.3 and it works great with PgSQL 8.4
#3
Thanks guys - I've never used PostgreSQL so have no experience (or system) for testing this.
I have applied a similar fix to that in your patch (I actually just switched the single and double quotes around... Works on MySQL and looks like it achieves the same thing as your patch).
Marking as TBP...
#4
Just tried the dev version on PostgreSQL 8.1.19 and it works fine.
#5
Thanks Beasley :)
#6
No problem. Thanks for the really useful module!
#7
This patch has been sitting around for a full eight months. Can we please get this into a release soon?
#8
This module uses invalid SQL syntax which breaks on postgres.
Basically, quote marks are around the wrong way
db_query('DELETE FROM {page_title} WHERE type = "term" AND id = %d', $edit['tid']);should be
db_query("DELETE FROM {page_title} WHERE type = 'term' AND id = %d", $edit['tid']);In all cases.
In then works fine on mysql and postgres.
Without this, postgres users see constant error messages on screen.
Otherwise, a useful module, thanks.
#9
Where / how have you used this patch?
I tried the patch through the PGSQL interface and came up with a pgsql error in the code.
I tried looking at database.pgsql.inc line 139, and dreamweaver'd the whole file looking for erroneous " to change them manually to ', everything is already apostrophed.
warning: pg_query(): Query failed: ERROR: column "node" does not exist in /includes/database.pgsql.inc on line 139.
warning: pg_query(): Query failed: ERROR: column "user" does not exist in /includes/database.pgsql.inc on line 139.
warning: pg_query(): Query failed: ERROR: column "timezone_id" of relation "users" does not exist in /includes/database.pgsql.inc on line 139
I get error node column doesn't exist, time_zone column not found...all basically the same error in line 139 database.pgsql.inc.
Any suggestions?
#10
This is fixed in both D6 and D7 - as far as I know.
#11
confirm - D6 version works with postgres 8.4
#12
thank you valthebald :)
#13
Automatically closed -- issue fixed for 2 weeks with no activity.