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