Needs review
Project:
Inline and link Drupal objects (Linodef)
Version:
6.x-1.x-dev
Component:
Taglists
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2010 at 06:01 UTC
Updated:
6 Jun 2010 at 06:01 UTC
Line 207 of taglist.load.inc reads:
$result = db_query('SELECT n.nid FROM {node} n WHERE n.type = "%s" order by n.%s %s', $contenttype, $tl_properties['sort_method'], $tl_properties['sort_sequence']);
As per: http://drupal.org/node/2497
In database queries, "Any string literal or %s placeholder must be enclosed by single quotes: ' . Never use double quotes."
One reason for this (there may be others?) is that PostgreSQL reserves double quotes in a query string for abnormal table / column names
As such this query fail with a "column not found" error on PgSQL.
For readability sake, typically the logical choice is to switch the quoting of the db_query string and its string literal arguments.
This seems to work fine in testing in a PgSQL environment:
| Comment | File | Size | Author |
|---|---|---|---|
| linodef-taglists-pgsql_quoting-1.patch | 1.18 KB | Vector- |