Skip to content

Commit 9e32feb

Browse files
authored
Merge pull request #405 from sake12/postgres10-fix
Use EXECUTE for index creation for compatibility with older PostgreSQL versions.
2 parents a5a7282 + c9ee54a commit 9e32feb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Hangfire.PostgreSql/Scripts/Install.v23.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ DROP INDEX IF EXISTS ix_hangfire_job_statename_is_not_null;
1212
DO $$
1313
BEGIN
1414
IF current_setting('server_version_num')::int >= 110000 THEN
15-
CREATE INDEX ix_hangfire_job_statename_is_not_null ON job USING btree(statename) INCLUDE (id) WHERE statename IS NOT NULL;
15+
EXECUTE 'CREATE INDEX ix_hangfire_job_statename_is_not_null ON job USING btree(statename) INCLUDE (id) WHERE statename IS NOT NULL';
1616
ELSE
1717
CREATE INDEX ix_hangfire_job_statename_is_not_null ON job USING btree(statename) WHERE statename IS NOT NULL;
1818
END IF;

0 commit comments

Comments
 (0)