Re: How to compare the results of two queries?

From: Igor Neyman <ineyman(at)perceptron(dot)com>
To: Juan Daniel Santana Rodés <jdsantana(at)estudiantes(dot)uci(dot)cu>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to compare the results of two queries?
Date: 2013-09-17 18:30:59
Message-ID: A76B25F2823E954C9E45E32FA49D70EC4281FC12@mail.corp.perceptron.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> -----Original Message-----
> From: Juan Daniel Santana Rodés [mailto:jdsantana(at)estudiantes(dot)uci(dot)cu]
> Sent: Tuesday, September 17, 2013 1:38 PM
> To: Igor Neyman
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] How to compare the results of two queries?
>
> El 17/09/13 12:56, Igor Neyman escribió:
> >
> >> -----Original Message-----
> >> From: Juan Daniel Santana Rodés [mailto:jdsantana(at)estudiantes(dot)uci(dot)cu]
> >> Sent: Tuesday, September 17, 2013 12:51 PM
> >> To: Igor Neyman
> >> Cc: pgsql-general(at)postgresql(dot)org
> >> Subject: Re: [GENERAL] How to compare the results of two queries?
> >>
> >> I want to know if there are other way to compare the result of two
> queries.
> >> Because the arguments will represent a query to execute and it can
> >> use everything sentence of SQL.
> >> If not there are other way, I wish know who are the limitations of EXCEPT.
> >> Greatens!!
> >> __________________________________________________
> >
> > In the modified function I put both queries in parenthesis, so this should
> allow pretty much anything in the query.
> >
> > Igor Neyman
> Thanks.
> I tested your code and worked fine.
> Now I only should catch the exception when the results of the querires has
> diferents munbers of columns.
> God bless you.
> __________________________________________________
> "Todos el 12 de Septiembre con una Cinta Amarilla"
> FIN A LA INJUSTICIA, LIBERENLOS YA!!
> http://www.antiterroristas.cu
> http://justiciaparaloscinco.wordpress.com

And of course, not just number of columns in the result sets, but their types should match as well.

Igor Neyman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Igor Neyman 2013-09-17 18:41:15 Re: Connect postgres to SQLSERVER
Previous Message John R Pierce 2013-09-17 18:30:19 Re: Connect postgres to SQLSERVER