Ticket #1128 (closed defect: notabug)
postgres doesn't replace {tablename}s?
| Reported by: | mikelietz | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | Undetermined |
| Component: | Habari Core Software | Version: | SVN |
| Keywords: | Cc: |
Description
See: r4026. That shouldn't be necessary, except that it didn't work for pgsql.
Every other insertRecord did use DB::table(), but those could also be {tablename} if it works for all databases.
From IRC ( log):
<michaeltwofish> So the fix probably should have been to make pgsql do the replacement, rather than use DB::table()
Change History
comment:2 Changed 15 months ago by rickc
I have difficulty seeing how this could be attributed to pgsql, since the string replacements for the table names is done by Habari. Could the problem be that DB::insert() expects the table names without braces, since Habari inserts the braces itself?
comment:3 Changed 15 months ago by chrismeller
- Status changed from new to closed
- Resolution set to notabug
All queries, regardless of how they are made, eventually get handed to DB::query(), which runs sql_t() for db-specific transformations and then filters the table strings. This substitution has nothing to do with the database itself or the database platform.
I suspect the table was actually being substituted in properly and there was some other issue, but debugging lead in the wrong direction.
