Skip to content

Commit

Permalink
postgresql: fix get_version() for older PostgreSQL versions
Browse files Browse the repository at this point in the history
The bare 'RETURN' statement in get_version() is caught as a syntax error
by PostgreSQL 12.x. Return the integer literal using a simple SQL
statement instead.
  • Loading branch information
hardboprobot authored and spbnick committed Mar 20, 2024
1 parent 4007930 commit 8924575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kcidb/db/postgresql/v04_00.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def set_schema_version(self, version):
RETURNS integer
LANGUAGE SQL
IMMUTABLE
RETURN %s
AS 'SELECT %s'
"""), (number, ))

def get_schema_version(self):
Expand Down

0 comments on commit 8924575

Please sign in to comment.