Re: Why is this function wrong

Поиск
Список
Период
Сортировка
От shakahshakah@gmail.com
Тема Re: Why is this function wrong
Дата
Msg-id 1130173257.448144.55500@g44g2000cwa.googlegroups.com
обсуждение исходный текст
Ответ на Re: Why is this function wrong  ("shakahshakah@gmail.com" <shakahshakah@gmail.com>)
Список pgsql-general
slight modification to the previous post, sorry, see
http://www.postgresql.org/docs/8.0/interactive/plpgsql-structure.html
for the real docs.

CREATE OR REPLACE FUNCTION "public"."cproc_hli" (bgtemp NUMERIC,
humidity NUMERIC, wspeed NUMERIC) RETURNS NUMERIC AS $$
BEGIN
  IF ($1 < 25) THEN
    SELECT (10.66 * (0.28 * $2)+(1.3 * $1) - $3) ;
  ELSE
    SELECT (8.62 * (0.38 * $2) + (1.55 * $1) - (0.5 * $3) + (exp(- $3 +
2.4))) ;
  END IF ;
END ;
$$ LANGUAGE 'plpgsql' VOLATILE RETURNS NULL ON NULL INPUT SECURITY
INVOKER;


В списке pgsql-general по дате отправления:

Предыдущее
От: "shakahshakah@gmail.com"
Дата:
Сообщение: Re: Why is this function wrong
Следующее
От: "Jan"
Дата:
Сообщение: PostgreSQL vs mySQL, any performance difference for large queries?