Skip to content

Any stored procedure is not working  #411

@zhousun

Description

@zhousun

What happens?

Stored procedure will run each query with more parameters, thus will always hit assert in duckdb.

To Reproduce

postgres=# create table t(a int);
CREATE TABLE
postgres=# SET duckdb.force_execution TO true;
SET
postgres=# CREATE OR REPLACE PROCEDURE t(b INT)
LANGUAGE plpgsql
AS $$
BEGIN
    select * from t where a=b;
END;
$$;
CREATE PROCEDURE
postgres=# call t(1);
ERROR:  (PGDuckDB/Duckdb_ExecCustomScan) Invalid Input Error: Parameter argument/count mismatch, identifiers of the excess parameters: 2
CONTEXT:  SQL statement "select * from t where a=b"
PL/pgSQL function t(integer) line 3 at SQL statement

OS:

MacOs

pg_duckdb Version:

0.1.0

Postgres Version:

16

Hardware:

No response

Full Name:

Zhou

Affiliation:

Mooncake Labs

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Not applicable - the reproduction does not require a data set

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions