Skip to content

Bind PostgreSQL values using strong type#1217

Merged
mvorisek merged 11 commits intodevelopfrom
pgsql_always_cast
May 19, 2024
Merged

Bind PostgreSQL values using strong type#1217
mvorisek merged 11 commits intodevelopfrom
pgsql_always_cast

Conversation

@mvorisek
Copy link
Copy Markdown
Member

@mvorisek mvorisek commented May 19, 2024

Fix pg_typeof(:a) throwing an exception:

SQLSTATE[42P08]: Ambiguous parameter: 7 ERROR:  could not determine data type of parameter $1

As of this PR citext PostgreSQL extension is required. The atk4/data will install the extension during the first SQL connection connect if not already installed, but CREATE DB priviledge is required.

This PR also highly improves testing quality as native DB types need to match the bound variable types.

@mvorisek mvorisek added the MAJOR label May 19, 2024
@mvorisek mvorisek force-pushed the pgsql_always_cast branch from d18b382 to e5a4239 Compare May 19, 2024 14:58
@mvorisek mvorisek force-pushed the pgsql_always_cast branch from e5a4239 to be5278a Compare May 19, 2024 15:08
@mvorisek mvorisek force-pushed the pgsql_always_cast branch from be5278a to 6ed24d8 Compare May 19, 2024 15:09
@mvorisek mvorisek force-pushed the pgsql_always_cast branch from c3d3f17 to 44e210f Compare May 19, 2024 16:10
@mvorisek mvorisek marked this pull request as ready for review May 19, 2024 16:14
@mvorisek mvorisek merged commit 3bc5dce into develop May 19, 2024
@mvorisek mvorisek deleted the pgsql_always_cast branch May 19, 2024 17:06
@mvorisek mvorisek restored the pgsql_always_cast branch May 20, 2024 23:57
@mvorisek mvorisek deleted the pgsql_always_cast branch May 20, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant