My bot isn't responding to seen queries.
When a user named "Shiny" appears:
query: DELETE FROM bot_seen WHERE LOWER(nick) = "shiny" in /home/brenda/projects/drupal-5.1/includes/database.pgsql.inc on line 144
pg_query(): Query failed: ERROR: column "shiny" does not exist in /home/brenda/projects/drupal-5.1/includes/database.pgsql.inc on line 125.
query: INSERT INTO bot_seen (nick, channel, message, timestamp) VALUES ("Shiny", "#drupal", "gargi_bot: seen Sho", 1176765625) in /home/brenda/projects/drupal-5.1/includes/database.pgsql.inc on line 144.
pg_query(): Query failed: ERROR: column "Shiny" does not exist in /home/brenda/projects/drupal-5.1/includes/database.pgsql.inc on line 12
And during seen queries, e.g. "seen sho"
query: SELECT nick, channel, message, timestamp FROM bot_seen WHERE LOWER(nick) LIKE "sho" ORDER BY timestamp DESC in /home/brenda/projects/drupal-5.1/includes/database.pgsql.inc on line 144.
Comment | File | Size | Author |
---|---|---|---|
#1 | bot_seen.module.patch | 2.03 KB | Shiny |
Comments
Comment #1
Shiny CreditAttribution: Shiny commentedthe " quotes are not valid SQL -- maybe mysql lets you do that but postgres is picky, so drupal's database abstraction layer knows this and turns them into "
here's a patch to bot_seen, that changes these to single quotes
Comment #2
Shiny CreditAttribution: Shiny commentedp.s. there a " in the above bug report, but they didn't make it to display on this site.
the module was sending " in the SQL.
Comment #3
Morbus IffThis will be committed shortly.
Comment #4
(not verified) CreditAttribution: commented