On Wed, 28 Mar 2001, Diana Cionoiu wrote:
>
> Salutari,
>
> Am shi eu o problema cu o funtzie.
>
> create function test(text)
> RETURNS text
> AS 'BEGIN
> select * from domenii where nume = $1;
> end;
> '
> LANGUAGE 'plpgsql';
>
> mesajul de eroare afisat de psql este
> select test('gigi');
> ERROR: unexpected SELECT query in exec_stmt_execsql()
> Are cineva o idee unde am greshit?
Nu accepta SELECT-ul ala.. daca tii cu tot dinadinsul:
CREATE FUNCTION test(text) returns text as
'declare
neimserver text;
begin
select nameserver into neimserver from domenii where name = $1;
return neimserver;
end;'
language 'plpgsql';
---
Numa' bine,
Claudiu Filip
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.