Re: [SQL] How can this be legal syntax

2008-12-17 Thread Jaime Casanova
On Tue, Dec 16, 2008 at 12:16 PM, Tom Lane wrote: > it's been like > that for so long that I'm worried about how much user code we'll break > if we do. > code making something like that is actually broken, what a "fix" here will do is making that obvious... -- Atentamente, Jaime Casanova Soport

Re: [SQL] How can this be legal syntax

2008-12-16 Thread Tom Lane
Alvaro Herrera writes: > Asko Oja escribió: >> I was quite amazed to find that this piece of code actually works while >> reviewing code. >> I would prefer if it gave an error :) > Yeah, me too. As the plpgsql docs say, "The INTO clause can appear almost anywhere in the SQL command". You can wr

Re: [SQL] How can this be legal syntax

2008-12-16 Thread Alvaro Herrera
Asko Oja escribió: > I was quite amazed to find that this piece of code actually works while > reviewing code. > I would prefer if it gave an error :) Yeah, me too. The functions posted by Josh Drake yesterday about constraint exclusion had something like select * from into temp table ...; (temp

[SQL] How can this be legal syntax

2008-12-16 Thread Asko Oja
I was quite amazed to find that this piece of code actually works while reviewing code. I would prefer if it gave an error :) test=# create or replace function test(i_input text) returns text as $$ declare result text; begin SELECT CASE WHEN lower(i_input) ~ '^[a-z]' THEN '