Re: select within a fucntion

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: select within a fucntion
Дата
Msg-id 200101191947.OAA07997@jupiter.jw.home
обсуждение исходный текст
Ответ на select within a fucntion  (Sinuhé Arroyo <sinuheag@isoco.com>)
Список pgsql-hackers
Sinuhi Arroyo wrote:
> I`mtrying to make a select which envolves two tables with in a
> function....if the query is written this way: (this is just an example,
> not my query)
>
> a := (select count(*) from xx);
>
> it works fine, but if I type the query like this
>
> select count(*) from xx;
>
> it throws a message that says unexpected query in exec_stmt_execsql.
> If anyone knows how to fix it, it woul be great.
> Thanx
   What  should  this "select count(*) from xx;" be good for, if   you don't want to use  the  result?  You  can  of
course do   "perform  select  ..."   because  that'd use another PL/pgSQL   executor construct that doesn't  complain
about getting  an   unused return value, but I still wonder why you want to waste   CPU and IO (bought an oversized
system?).


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bit strings
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: AW: AW: AW: Re: tinterval - operator problems on AIX