Skip to content

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

Merged
mvorisek merged 6 commits intodevelopfrom
fix_pgsql_ci
Oct 15, 2022
Merged

Fix SQL multiply of 2 bind params in multiline demo for PostgreSQL#1905
mvorisek merged 6 commits intodevelopfrom
fix_pgsql_ci

Conversation

@mvorisek
Copy link
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

1 participant