-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing a new pg_tle extension version which requires following an upgrade path doesnt' work #159
Comments
Hey @tiniscule, How did you install To debug, you can see which update paths are available with |
Thanks for the quick response @imor , yes it was installed with the dbdev local command. dbdev version: 0.1.5; result of extension_update_paths query: That second one seems odd, is that to be expected? here's the file structure: |
Yes, that is ok. Postgres doesn't really understand the contents of a version. They are just treated a opaque strings. So it doesn't know which version is greater, it just lists all combinations of source and target. That's really weird, the data you have shared looks completely fine to me. The To further debug it can you please share:
|
pg_tle version: 1.0.4 |
Okay this is a -- install version 1.0 of an extension
SELECT pgtle.install_extension
(
'test123',
'1.0',
'Test TLE Functions',
$_pgtle_$
CREATE OR REPLACE FUNCTION test123_func()
RETURNS INT AS $$
(
SELECT 10
)$$ LANGUAGE sql;
$_pgtle_$
);
-- create update path to 1.1
SELECT pgtle.install_update_path
(
'test123',
'1.0',
'1.1',
$_pgtle_$
CREATE OR REPLACE FUNCTION test123_func()
RETURNS INT AS $$
(
SELECT 11
)$$ LANGUAGE sql;
$_pgtle_$
);
--confirm that the upgrade paths are registered
select * from pgtle.extension_update_paths('test123');
-- create extension should pass but it fails with the error:
-- ERROR: could not find sql function "test123--1.1.sql" for extension test123 in schema pgtle
--
-- SQL state: XX000
CREATE EXTENSION test123 version '1.1'; I couldn't reproduce it earlier because I was on the latest dev version of |
Bug report
I have 2 files for my extension.
basejump_core--2.0.1.sql
basejump_core--2.0.1--2.1.0.sql
Default version set to 2.1.0.
On a clean install, running
create extension "basejump_core" version '2.1.0';
will fail with the following error:Based on the pg_tle docs, this appears like it should work by first installing 2.0.1 and then following the 2.1.0 path - but doesn't seem to.
To Reproduce
Here's a PR with the upgrade I'm working on which doesn't work: usebasejump/basejump#57
Expected behavior
I expect the extension to be installable to 2.1.0 without having a dedicated
basejump_core--2.1.0.sql
extension fileThe text was updated successfully, but these errors were encountered: