Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 2BFFAC7DB12 for ; Mon, 19 Mar 2012 17:04:25 -0300 (ADT) Received: from smtp104.prem.mail.ac4.yahoo.com ([76.13.13.43]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1S9ioY-0007KJ-7A for pgsql-sql@postgresql.org; Mon, 19 Mar 2012 20:04:24 +0000 Received: (qmail 36951 invoked from network); 19 Mar 2012 20:04:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-Mailer:Thread-Index:Content-Language; b=lf7I1myvVdDJXOYXnotxpoj/TPqI8a6crp8RW2ZcmTEQ7Rnvu4HeRsTRoDBGkdWwxT36LMzWXlnwR+v6GwTrFIQLS1ehDeoSjmj0nlS366ZkyI7aILN4IhUUdoGqoX+PANVfprr8yKvy71Av/FL//C7eAbeOFHFozQxNltT6C0o= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1332187448; bh=vFsJerm7ilhI9/9bmKHA4AyZ32Y2pFQt+RkkYucq9bQ=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-Mailer:Thread-Index:Content-Language; b=rl81TTFXxNgFgOlAnY6Plv4zsLqBpgj/DHJ0ntSNp5TVKbKIP1WGgMn+FPJ3QC94JpJHdGllGsEAif7pdDba5ePJCGj4a+lfGYs9MLssEKgE9umLPOdRpuVR6vuXuykVVQbPh0iKB3ZNbMtoCYzNuLpyIOhM2bpLQnRtyqqcaeI= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Yq9IjOAVM1mIhMBILFa33UGMYJqgormnPQC7JJ3VdJg4gyf GzIVIfBfqgDvnyicv2Hbo3xG60cpMEtKI1KUs1nCiy6qbmVBu6_Afa6W6lIy ksBujHHWWqmCe6GQUORnONV6EpLGO1QzJCBA6hwiGkX.Zhp2.FXrs6QFG0NL SHDWK5lAzPQjKEBQsTsLmOxxeiOm7_s8BXsBKidbnse59xcn_XSIP85Zzp32 pf5Go1j6kJjSaJt8BSFTeVjQTY4vzcJ6VoWiP84ZFKynP6PvuKq8xTQyfJL2 5F25QIUPZbvie6ysPyvCw2V10PHFcIf1GBJU5QiWROu.2gtOk9Psah8wR2TH tODSQsH_HoI.kqtoQYhMUbkscBOf4m3GZtnSxanlsbZlEd1oz59lB34_o79j .Eo0QP1M7NMIHbaU9FqBI X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from WolfDog (polobo@24.93.23.188 with login) by smtp104.prem.mail.ac4.yahoo.com with SMTP; 19 Mar 2012 13:04:08 -0700 PDT From: "David Johnston" To: "'Rehan Saleem'" , References: <1332186006.44650.YahooMailNeo@web121605.mail.ne1.yahoo.com> In-Reply-To: <1332186006.44650.YahooMailNeo@web121605.mail.ne1.yahoo.com> Subject: Re: Postgresql function which compares values from both tables Date: Mon, 19 Mar 2012 16:04:04 -0400 Message-ID: <00b101cd060b$6f87a560$4e96f020$@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00B2_01CD05E9.E876EFC0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHFL+j3y9jTbY3Yw2YNdysepRDFF5aBtwfg Content-Language: en-us X-Pg-Spam-Score: -0.1 (/) X-Archive-Number: 201203/49 X-Sequence-Number: 36444 This is a multipart message in MIME format. ------=_NextPart_000_00B2_01CD05E9.E876EFC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit You would need to install the "HSTORE" extension to convert the record into a key->value pair then perform the comparison on that. Dave From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Rehan Saleem Sent: Monday, March 19, 2012 3:40 PM To: pgsql-sql@postgresql.org Subject: [SQL] Postgresql function which compares values from both tables hi , how to write a function which should read data from 2 tables having same number of columns and should show the common values from those tables. thanks ------=_NextPart_000_00B2_01CD05E9.E876EFC0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

You would need to install the “HSTORE” extension to = convert the record into a key->value pair then perform the comparison = on that.

 

Dave

 

 

From:= = pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] = On Behalf Of Rehan Saleem
Sent: Monday, March 19, 2012 = 3:40 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] = Postgresql function which compares values from both = tables

 

hi ,
how to = write a function which should read data from 2 tables having same number = of columns and should show the common values from those = tables.
thanks

------=_NextPart_000_00B2_01CD05E9.E876EFC0--