Re: BUG #11094: Does not report error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: henart(at)sofisticat(dot)com(dot)br
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11094: Does not report error
Date: 2014-07-30 21:51:46
Message-ID: 14893.1406757106@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

henart(at)sofisticat(dot)com(dot)br writes:
> drop type if exists tp_testes cascade;
> create type tp_testes as ( tipo integer);
> create or replace function fnc_testes() returns tp_testes as
> $$
> declare
> t tp_testes;
> x integer;
> begin
> t.tipo = 1;
> x = t.valor ;
> return t;
> end;
> $$
> language plpgsql;

> the above script does not report error when compiling the function, but
> "t.valor" does not exists in type.

It's not expected to give an error; expressions are only syntax-checked
not analyzed for semantic validity.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Davide Gonnella 2014-07-30 22:11:20 Is this a bug?
Previous Message henart 2014-07-30 21:04:17 BUG #11094: Does not report error