2011/5/28 Emanuel Calvo :
>>>
>>> Thanks Heikki for your fast response! ^^
>>>
>>>
The compiler would have to determine that the loop never ends, or it
would complain that there's no RETURN at the end.
Many compilers for other languages do that kind of analysis, but it
usua
>>
>> Thanks Heikki for your fast response! ^^
>>
>>
>>> The compiler would have to determine that the loop never ends, or it
>>> would complain that there's no RETURN at the end.
>>>
>>> Many compilers for other languages do that kind of analysis, but it
>>> usually only results in a warning, and
2011/5/28 Emanuel Calvo :
> El 27/05/2011 16:18, "Heikki Linnakangas"
> escribió:
>> On 27.05.2011 17:05, Emanuel wrote:
>>> postgres=# CREATE OR REPLACE FUNCTION p_() RETURNS TABLE (i int) AS $$
>>> DECLARE
>>> BEGIN
>>> SELECT * FROM p; --<<<-- here must ne RETURN QUERY ..
>>> END;
>>> $$ LANGUA
El 27/05/2011 16:18, "Heikki Linnakangas" <
heikki.linnakan...@enterprisedb.com> escribió:
> On 27.05.2011 17:05, Emanuel wrote:
>> postgres=# CREATE OR REPLACE FUNCTION p_() RETURNS TABLE (i int) AS $$
>> DECLARE
>> BEGIN
>> SELECT * FROM p; --<<<-- here must ne RETURN QUERY ..
>> END;
>> $$ LANGU
On 27.05.2011 17:05, Emanuel wrote:
postgres=# CREATE OR REPLACE FUNCTION p_() RETURNS TABLE (i int) AS $$
DECLARE
BEGIN
SELECT * FROM p; --<<<-- here must ne RETURN QUERY ..
END;
$$ LANGUAGE plpgsql;
CREATE FUNCTION
postgres=# select p_();
ERROR: query has no destination for result data
HIN
The following bug has been logged online:
Bug reference: 6043
Logged by: Emanuel
Email address: postgres@gmail.com
PostgreSQL version: 9.1 beta
Operating system: Ubuntu 10.04 2.6.31
Description:Compilation PLpgsql Succesful but execution bad
Details:
postgres=#