Skip to content

Conversation

@ovaris
Copy link

@ovaris ovaris commented Jan 21, 2026

Summary

  • Force pg_catalog.to_timestamp($n::double precision) to avoid overload ambiguity in PG17/EDB.

Details

  • Update all session queries (prune/get/set/touch) to cast the timestamp parameter to double precision.
  • This prevents Postgres from choosing text parsing (e.g. MON format errors) when parameters are typed as unknown.
  • The issue did not reproduce on vanilla PostgreSQL 17, only on EDB Advanced Server (Oracle compatibility).

Testing

  • Verified in our EDB PG17 test environment: session creation works after change.

Issue

Copilot AI review requested due to automatic review settings January 21, 2026 12:41
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Compliance Checks Passed!

@ovaris ovaris changed the title Fix to_timestamp parameter typing for PG17/EDB fix: correct to_timestamp parameter typing for PG17/EDB Jan 21, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a parameter type ambiguity issue in PostgreSQL 17 / EDB Advanced Server by explicitly casting to_timestamp parameters to double precision and using the pg_catalog schema prefix. This prevents PostgreSQL from incorrectly choosing the text parsing overload when parameters have unknown types.

Changes:

  • Updated all SQL queries to cast timestamp parameters as ::double precision in to_timestamp() calls
  • Added pg_catalog. schema prefix to to_timestamp function calls for consistency and to avoid search path issues

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant