Re: 8.3 PLpgSQL Can't Compare Records?

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.3 PLpgSQL Can't Compare Records?
Date: 2009-07-01 19:36:21
Message-ID: 95EEDB4E-CAB0-43DB-A4C0-DA41D388D9F0@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 1, 2009, at 11:47 AM, Merlin Moncure wrote:

>> fyi: works in 8.4, as part of a broad fix of composite type
>> comparison ops
>
> whoops, you knew that already :-). one possible workaround is:
>
> select $1::text is distinct from $2::text

Yes, and that's what I'm doing, although it is significantly less
precise, in that:

* Columns with different types may successfully compare (e.g., NULL
and '')
* No (easy) way to tell if two records have different numbers of columns

But it's good enough for 8.3 if there is no other workaround.

Thanks,

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Lorraine Mancuso 2009-07-01 20:19:48 resetxlog bug
Previous Message Bruce Momjian 2009-07-01 18:49:12 Re: 8.5 development schedule