Skip to content
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

Fix SQL multiply of 2 bind params in multiline demo for PostgreSQL #1905

Merged
merged 6 commits into from
Oct 15, 2022

Conversation

mvorisek
Copy link
Member

@mvorisek mvorisek commented Oct 15, 2022

Atk4\Data\Persistence\Sql\ExecuteException [code: 7]:
ERROR: operator is not unique: unknown * unknown
LINE 1: ..._box", $7 * $8 "atk_...
HINT:  Could not choose a best candidate operator. You might need to add explicit type casts.
query:
select (-1) "atk_fp_multiline_item__id",
    'Chocolate' "atk_fp_multiline_item__item",
    '2020-02-20' "atk_fp_multiline_item__inv_date",
    '07:20:00.000000' "atk_fp_multiline_item__inv_time",
    80 "atk_fp_multiline_item__country_id",
    0 "atk_fp_multiline_item__qty",
    5 "atk_fp_multiline_item__box",
    0 * 5 "atk_fp_multiline_item__total_sql",
    NULL "atk_fp_multiline_item__total_php"
from "multiline_item" limit 1 offset 0

related with atk4/data#989

the problem is type info is not avaialbe before the SQL bind params are passed, but PostgreSQL needs the type info earlier

@mvorisek mvorisek changed the title Fix SQL bind params multiply in multiline demo for PostgreSQL Fix SQL multiply of 2 SQL params in multiline demo for PostgreSQL Oct 15, 2022
@mvorisek mvorisek changed the title Fix SQL multiply of 2 SQL params in multiline demo for PostgreSQL Fix SQL multiply of 2 bind params in multiline demo for PostgreSQL Oct 15, 2022
@mvorisek mvorisek marked this pull request as ready for review October 15, 2022 16:59
@mvorisek mvorisek merged commit 51fb727 into develop Oct 15, 2022
@mvorisek mvorisek deleted the fix_pgsql_ci branch October 15, 2022 17:07
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.

None yet

1 participant