From: Richard Broersma Jr <rabroersma@yahoo.com>
To: christian.roche.ext@nsn.com
Cc: SQL Postgresql List <pgsql-sql@postgresql.org>
Subject: Re: Whole-row comparison ?
Date: Thu, 17 May 2007 10:20:35 -0700 (PDT)
Message-ID: <473557.7523.qm@web31803.mail.mud.yahoo.com> (raw)
In-Reply-To: <CCC9DCA122011F4CA593F6A548BFFBD354D259@esebe111.NOE.Nokia.com>
--- christian.roche.ext@nsn.com wrote:
> select * from temp."BSC_Table" t, public.bsc_view p where t.id = p.id
> and row(t) <> row(p);
>
> ERROR: operator does not exist: "temp"."BSC_Table" <> bsc_view
> SQL state: 42883
> Hint: No operator matches the given name and argument type(s). You may
> need to add explicit type casts.
>
Don't forget to reply all so that everyone on the list can participate. Also, do this is good
since it doesn't limit you to my limited knowledge. ;)
row() doesn't do what you think it does.
you have to specify every column that you want to compare, so:
row(t.col1, t.col2, t.col3, t.col4) <> row(p.col1, p.col2, p.col3, p.col4)
where the datatypes of each respective column match. i.e. t.col1 maps to p.col1, ...
Regards,
Richard Broersma Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rabroersma@yahoo.com, christian.roche.ext@nsn.com
Subject: Re: Whole-row comparison ?
In-Reply-To: <473557.7523.qm@web31803.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox