From eflores767003@yahoo.com.mx Sat Mar 3 22:09:02 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6E1D79FB2D9 for ; Sat, 3 Mar 2007 18:09:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 33587-09 for ; Sat, 3 Mar 2007 18:08:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from web55602.mail.re4.yahoo.com (web55602.mail.re4.yahoo.com [206.190.58.226]) by postgresql.org (Postfix) with SMTP id 91E5F9FB2D0 for ; Sat, 3 Mar 2007 18:08:58 -0400 (AST) Received: (qmail 56867 invoked by uid 60001); 3 Mar 2007 22:08:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.mx; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=L+A4lbCFNdFrBHXHuYwTpqsWlYgItPzOXOSJHJF4EX561uwvsg7CV1JD5A3nE2xwJKdZPP4HYKhKaNCa/99+yL2mxUXL9zLMo95XTrJ1dhADR5dOqCqwXB/Wq8yVnXD0pqoQs7YFdq8AIdYT5RcAbhRxrsuVNvnY3xbJEiQL0Vc=; X-YMail-OSG: xgjCmtEVM1lbeNqNaR_3rV7awK5H6PuFlxwhdwpzztUyQKLYKidy7wDBFi3iVXj2yTqh7Ps1UK6MGMOWh0gwDs13OW3h.mujk9Jo3dXg6c9plZGbcZOXa_Zlsz_NUDBOezrAFj1oprM3HQ90aKCJOYbi Received: from [165.98.140.116] by web55602.mail.re4.yahoo.com via HTTP; Sat, 03 Mar 2007 14:08:57 PST X-Mailer: YahooMailRC/468 YahooMailWebService/0.6.132.8 Date: Sat, 3 Mar 2007 14:08:57 -0800 (PST) From: Eugenio Flores Subject: How to return a select query To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1963988450-1172959737=:50573" Message-ID: <213647.50573.qm@web55602.mail.re4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.45 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200703/22 X-Sequence-Number: 27660 --0-1963988450-1172959737=:50573 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello. I would like to know how can I return a select expresion, and stored= in a variable, as cursors, but without the need of fetching it, and just = to get the hole resultset.=0A=0AFor example. I want to get this query: Sele= ct * from table1, and stored in a variable that I can return to, like a row= type variable. =0A=0AWhat I want is to call this function from a client apl= ication and show the result in a table. Like a JTable in java. =0A=0AThanks= in advance for your help.=0A=0AGreetings.=0A=0A=0A=09=0A=09=0A=09=09=0A___= ________________________________________________________ =0ADo You Yahoo!? = =0ALa mejor conexi=F3n a Internet y 2GB extra a tu correo por $100 = al mes. http://net.yahoo.com.mx =0A --0-1963988450-1172959737=:50573 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hello. I would like to know how can I return a select = expresion, and stored in a variable, as cursors, but without the need of&nb= sp; fetching it, and just to get the hole resultset.
=0A
 =0A
For example. I want to get this query: Select * from table1, and= stored in a variable that I can return to, like a rowtype variable. <= /DIV>=0A
 
=0A
What I want is to call this function from = a client aplication and show the result in a table. Like a JTable in java. =
=0A
 
=0A
Thanks in advance for your help.
=0A=
 
=0A
Greetings.
=0A
 
=0A
 =

=0A=09=09
=0ADo You Yahoo!? =0ALa mejor conex= i=F3n a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx =0A --0-1963988450-1172959737=:50573-- From rdeleonp@gmail.com Sun Mar 4 06:44:50 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id CA08A9FB323 for ; Sun, 4 Mar 2007 02:44:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 84093-04 for ; Sun, 4 Mar 2007 02:44:46 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.237]) by postgresql.org (Postfix) with ESMTP id 945059FB292 for ; Sun, 4 Mar 2007 02:44:47 -0400 (AST) Received: by nz-out-0506.google.com with SMTP id r28so1427223nza for ; Sat, 03 Mar 2007 22:44:47 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Pp3RR2fUBKFl+tpan2Tb1z8GXWU6d7duzKlv41+cPxL3PdDW9OcToMtNW+szCFT90NwgQmCjDkFsGm9pub4N1ehB6k7Nike2kVCGMjGnIONyYoe7+bWUeMm7HuNMXP0kW5DpBjfXs8cBHF4c8dlYzG4ntlHxRJMZoyoa6pOB3fg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bm5RxornvUixE+yBo3jd2wQdjECNwI+RsbeZnRcbiZXdM5R1myoWtMj+OXtaXKDs/S5AJQq7/WBGum90iPOyAqAG6e4LIe7O/yCfYpvd2Qxe4V5107qIz08Zew/9TgG+b7hOkkSPg37/3PnxvMuiKgsE2EKIpJC0qy0qMnTcH+Q= Received: by 10.115.77.1 with SMTP id e1mr840432wal.1172990686872; Sat, 03 Mar 2007 22:44:46 -0800 (PST) Received: by 10.114.169.12 with HTTP; Sat, 3 Mar 2007 22:44:46 -0800 (PST) Message-ID: Date: Sun, 4 Mar 2007 01:44:46 -0500 From: "=?ISO-8859-1?Q?Rodrigo_De_Le=F3n?=" To: pgsql-sql@postgresql.org Subject: Re: How to return a select query In-Reply-To: <213647.50573.qm@web55602.mail.re4.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <213647.50573.qm@web55602.mail.re4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/23 X-Sequence-Number: 27661 On 3/3/07, Eugenio Flores wrote: > Hello. I would like to know how can I return a select expresion, and stored > in a variable, as cursors, but without the need of fetching it, and just to > get the hole resultset. > > For example. I want to get this query: Select * from table1, and stored in a > variable that I can return to, like a rowtype variable. > > What I want is to call this function from a client aplication and show the > result in a table. Like a JTable in java. > > Thanks in advance for your help. > > Greetings. See: http://www.postgresql.org/docs/8.2/static/queries-table-expressions.html#QUERIES-TABLEFUNCTIONS