Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#4296 closed defect (fixed)

Use `server_version_num` instead of parsing version()

Reported by: Algunenano Owned by: Algunenano
Priority: medium Milestone: PostGIS 2.3.9
Component: postgis Version: 2.3.x
Keywords: Cc:

Description

Some PostgreSQL forks (e.g. EnterpriseDB) modify the version() output so matching PostgreSQL ([0-9\.]+) doesn't work. This affects postgis_extension_remove_objects and _postgis_pgsql_version functions.

Using SELECT current_setting('server_version_num') should be equivalent and clearer.

Change History (7)

comment:1 by Raul Marin, 5 years ago

In 17178:

Use server_version_num instead of parsing version()

References #4296

comment:2 by Raul Marin, 5 years ago

In 17179:

Use server_version_num instead of parsing version()

References #4296

comment:3 by Raul Marin, 5 years ago

In 17180:

Use server_version_num instead of parsing version()

References #4296

comment:4 by Raul Marin, 5 years ago

Resolution: fixed
Status: assignedclosed

In 17181:

Use server_version_num instead of parsing version()

Closes #4296
Closes https://github.com/postgis/postgis/pull/363

comment:5 by Raul Marin, 5 years ago

In 17205:

Partially revert r17179

It changed the behaviour of _postgis_pgsql_version
Now uses the appropiate 5-6 digit version from server_version_num

References #4296
References #4303

comment:6 by Raul Marin, 5 years ago

In 17206:

Partially revert r17180

It changed the behaviour of _postgis_pgsql_version
Now uses the appropiate 5-6 digit version from server_version_num

References #4296
References #4303

comment:7 by Raul Marin, 5 years ago

In 17207:

Partially revert r17181

It changed the behaviour of _postgis_pgsql_version
Now uses the appropiate 5-6 digit version from server_version_num
References #4296
References #4303

Note: See TracTickets for help on using tickets.