Skip to content

Commit

Permalink
Remove unneeded function replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
syvb committed Oct 25, 2022
1 parent 7765f8a commit 84a7fdf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/post-install/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ fn add_version_to_install_script(
let module_path = format!("$libdir/timescaledb_toolkit-{}", current_version);

transform_file_to(&install_script, &versioned_script, |line| {
if line.contains("CREATE OR REPLACE FUNCTION") {
return line.replace("CREATE OR REPLACE FUNCTION", "CREATE FUNCTION");
}
assert!(
!line.contains("CREATE OR REPLACE FUNCTION"),
"pgx should not generate CREATE OR REPLACE in functions"
);
if line.contains("MODULE_PATHNAME") {
return line.replace("MODULE_PATHNAME", &module_path);
}
Expand Down

0 comments on commit 84a7fdf

Please sign in to comment.