From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Weiping He <laser(at)zhengmai(dot)com(dot)cn>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Anybody see the post? |
Date: | 2003-02-18 20:14:42 |
Message-ID: | 3E529432.BD3A1696@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
>
> Weiping He <laser(at)zhengmai(dot)com(dot)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(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Medi Montaseri | 2003-02-18 20:52:54 | How to reset pg_stat_user_tables |
Previous Message | Tom Lane | 2003-02-18 19:51:14 | Re: changing the last_value in a sequence |