Commit 1ea81d3c authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

pithos: Restore PostgreSQL 8.4 compatibility

Change SQLAlchemy statement to generate SQL code that uses ||
concatenation operator instead of the 'concat' function
(inexistent in earlier PostgreSQL versions than 9.1)
parent 74f20131
......@@ -23,7 +23,7 @@ from sqlalchemy import (Table, Integer, BigInteger, DECIMAL, Boolean,
from sqlalchemy.schema import Index, Sequence
from sqlalchemy.sql import (func, and_, or_, not_, select, bindparam, exists,
from sqlalchemy.sql.expression import true, literal
from sqlalchemy.sql.expression import true, literal, type_coerce
from sqlalchemy.exc import NoSuchTableError, IntegrityError
from dbworker import DBWorker, ESCAPE_CHAR
......@@ -826,9 +826,8 @@ class Node(DBWorker):
if size == 0:
mapfile = None
elif mapfile is None:
mapfile = functions.concat(literal(self.mapfile_prefix),
mapfile = literal(self.mapfile_prefix) + \
type_coerce(functions.next_value(self.mapfile_seq), String)
s = self.versions.insert().returning(self.versions.c.serial,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment