So I have a custom plpgsql extension that I installed in /usr/share/postgresql/13/extension
that works properly.
The problem I'm facing is that I'm trying to update the extension by replacing the test_ext--1.0.sql
& test_ext.control
files with updated ones- test_ext--1.1.sql
.
I've updated the control file to display version 1.1.
test_ext.control
# test_ext extension
comment = 'Test Extension for dummy_schema.'
default_version = '1.1'
relocatable = true
# requires = ‘pg_stat_statements’
# directory = 'extension'
My steps where:
- drop the existing extension
- replace .SQL & control files
CREATE EXTENSION test_ext SCHEMA dummy_schema;
After creating the extension, I'm still presented with the old extension rather than the new one.
List of installed extensions
Name | Version | Schema | Description
--------------+---------+------------+----------------------------------------------------------------------
test_ext | 1.0 | dummy_schema | Test Extension for dummy_schema.
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
postgres_fdw | 1.0 | dummy_schema | foreign-data wrapper for remote PostgreSQL servers
timescaledb | 2.4.0 | dummy_schema | Enables scalable inserts and complex queries for time-series data
(4 rows)
I've ran ALTER EXTENSION test_ext UPDATE to "1.1";
but I get an error saying
ERROR: extension "test_ext" has no update path from version "1.0" to version "1.1"
I've even tried rebooting postgres service after extension install only to get same results.
I'm out of ideas.
test_ext--1.0sql
with a newtest_ext--1.1.sql
. Are you saying I have to keep the same SQL file name?