Re: plpgsql and rowtypes
От | Dave Trombley |
---|---|
Тема | Re: plpgsql and rowtypes |
Дата | |
Msg-id | 3C325F1F.2000001@bumba.net обсуждение исходный текст |
Ответ на | plpgsql and rowtypes (Dave Trombley <dtrom@bumba.net>) |
Ответы |
Re: plpgsql and rowtypes
|
Список | pgsql-general |
Tom Lane wrote: > >Not sure why plpgsql insists on the explicit marker that a rowtype is >meant, but it does. > Oh, spiffy. This works now, thanks. One other thing that seems odd to me follows, the relevant documentation is section 23.6.2.4. Again, I could be misunderstanding the semantics, but it seems intuitively wrong that this construct should behave as I'm seeing: test=# CREATE FUNCTION ifelsetest(int) RETURNS bool AS ' test'# BEGIN test'# IF $1 = 4 THEN RETURN true; test'# ELSIF $1 = 7 THEN RETURN true; test'# ELSE return false; test'# END IF; test'# END; ' language 'plpgsql'; CREATE test=# select ifelsetest(2); ifelsetest ------------ f (1 row) test=# select ifelsetest(4); ifelsetest ------------ t (1 row) test=# select ifelsetest(7); ifelsetest ------------ f (1 row) Cheers, dj trombley <dtrom@bumba.net>
В списке pgsql-general по дате отправления: