Re: select within a fucntion

From: "Sinuh Arroyo Gmez" <sinuheag(at)isoco(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: select within a fucntion
Date: 2001-01-23 09:19:08
Message-ID: 94ji7k$1ihq$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The thing is that Im not interested in wasting CPU nor my ystem is
oversized, and of course, "my friend", I willl use the results of the
select, because as a matter of fact it was a select .. into statement the
one I was trying, but to make it easier to understand (I now see you were so
smart that this was a waste of time), I just wrote a select statement which
by the way, trows the same exception.
Thanks

"Jan Wieck" <janwieck(at)Yahoo(dot)com> escribi en el mensaje
news:200101191947(dot)OAA07997(at)jupiter(dot)jw(dot)home(dot)(dot)(dot)
> 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(at)Yahoo(dot)com #
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pete Forman 2001-01-23 10:59:28 Re: postgres memory management
Previous Message Zeugswetter Andreas SB 2001-01-23 09:15:14 AW: int4 or int32