#304 plpgsql: could not determine data type of parameter $1

1.0 Dev Q
closed
None
5
2012-05-07
2012-04-27
No

1) Upload file attached from test plpgsql
2) run that:
select * from PField_v1 where pfname = 'PF0_1' order by slotname; --error
3) This one works however:
select * from PField_v1 where pfname = 'PF0_2' order by slotname;

Discussion

  • Michael Paquier

    Michael Paquier - 2012-04-27

    Data file to run

     
  • Michael Paquier

    Michael Paquier - 2012-04-27

    -- More simple test case:
    SET enforce_two_phase_commit TO off;
    create temp table foo (f1 int);
    create function blockme() returns int as $$
    declare x int;
    begin
    x := 1;
    insert into foo values(x);
    begin
    x := x + 1;
    insert into foo values(x);
    select count(*) into x from tenk1 a, tenk1 b, tenk1 c;
    exception
    when others then
    raise notice 'caught others?';
    return -1;
    when query_canceled then
    raise notice 'nyeah nyeah, can''t stop me';
    x := x * 10;
    end;
    insert into foo values(x);
    return x;
    end$$ language plpgsql;
    set statement_timeout to 2000;
    select blockme();
    reset statement_timeout;

     
  • Michael Paquier

    Michael Paquier - 2012-04-27

    -- More simplified test:
    create table foo (f1 int);
    create function test() returns int as $$
    declare x int;
    begin
    x := 1;
    insert into foo values(x);
    begin
    x := x + 1;
    insert into foo values(x);
    end;
    return x;
    end$$ language plpgsql;
    select test();

     
  • Michael Paquier

    Michael Paquier - 2012-05-07
    • status: open --> closed
     
  • Michael Paquier

    Michael Paquier - 2012-05-07

    The same issue as in commit 8e393db79e43f0a5605fed35d55af8375b4ffe2c is in test, but regression test is fixed by commit 41497f7.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks