pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #11094: Does not report error
2+ messages / 2 participants
[nested] [flat]

* BUG #11094: Does not report error
@ 2014-07-30 21:04 henart@sofisticat.com.br
  2014-07-30 21:51 ` Re: BUG #11094: Does not report error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: henart@sofisticat.com.br @ 2014-07-30 21:04 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      11094
Logged by:          Henart
Email address:      henart@sofisticat.com.br
PostgreSQL version: 9.3.4
Operating system:   CentOS 6.5
Description:        

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. 
if i use

t.valor = 1;

error occurs when compiling the function. in earlier versions (such as 8.4),
SQL STATE 42703 error occurs.

Tks


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #11094: Does not report error
  2014-07-30 21:04 BUG #11094: Does not report error henart@sofisticat.com.br
@ 2014-07-30 21:51 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2014-07-30 21:51 UTC (permalink / raw)
  To: henart@sofisticat.com.br; +Cc: pgsql-bugs

henart@sofisticat.com.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2014-07-30 21:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-07-30 21:04 BUG #11094: Does not report error henart@sofisticat.com.br
2014-07-30 21:51 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox