Re: Anybody see the post? - Mailing list pgsql-general

From Jan Wieck
Subject Re: Anybody see the post?
Date
Msg-id 3E529432.BD3A1696@Yahoo.com
Whole thread Raw
In response to Anybody see the post?  (Weiping He <laser@zhengmai.com.cn>)
List pgsql-general
Tom Lane wrote:
>
> Weiping He <laser@zhengmai.com.cn> writes:
> >      it seems PERFORM won't affect result status while doing
> >      SELECT ... query, but EXECUTE do.
>
> It works for me.
>
> >          raise notice '' SQL: % '', qry;
> > --      execute qry;
> >          perform qry;
>
> This should give you an error.  perform doesn't take a string
> expression.  You want something more like
>
>         perform t FROM test where ...

PERFORM was originally added because we have no resultless procedures,
only functions, and calling a function with SELECT and discarding the
result seemed unobvious, so PERFORM does exactly that for you. It's
useless syntactic sugar.


Jan

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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: changing the last_value in a sequence
Next
From: Medi Montaseri
Date:
Subject: How to reset pg_stat_user_tables