Re: BUG #8893: Precompiler ECPG doesn't check Var-List in Select corrrect.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Boszormenyi Zoltan <zboszor(at)pr(dot)hu>
Cc: herbert(dot)grohmann(at)vallourec(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8893: Precompiler ECPG doesn't check Var-List in Select corrrect.
Date: 2014-01-20 23:48:13
Message-ID: 6668.1390261693@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Boszormenyi Zoltan <zboszor(at)pr(dot)hu> writes:
> 2014-01-20 16:36 keltezssel, Tom Lane rta:
>> Unfortunately, that's legal SQL syntax: stoerzeit_a11 is taken as a column
>> alias for sugru_9, even without AS in front of it.

> Still, this particular problem may be caught by the preprocessor.
> The SELECT targetlist is not "*", so the number of members for both
> the targetlist and the user structure (INTO :s_schichtsatz) are known.

Yeah, good point. There was a comparable complaint a couple days ago
about plpgsql not checking its INTO target count carefully enough.
In both cases we could improve the odds of catching an error, even if
it wouldn't be perfect.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Sandeep Thakkar 2014-01-21 08:51:57 Re: permission issues with PostgreSQL 9.2 EnterpriseDB one-click installer on windows 7 causes initcluster to fail
Previous Message Boszormenyi Zoltan 2014-01-20 22:20:22 Re: BUG #8893: Precompiler ECPG doesn't check Var-List in Select corrrect.