Re: checksum - Mailing list pgsql-general

From Mike Rylander
Subject Re: checksum
Date
Msg-id b918cf3d04092705157c7dfcde@mail.gmail.com
Whole thread Raw
In response to Re: checksum  (David Helgason <david@uti.is>)
Responses Null comparisons (was Re: checksum)  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
On Sun, 26 Sep 2004 20:16:52 +0200, David Helgason <david@uti.is> wrote:
> >   I was wondering if PGSQL has a function similar to binary_checksum()
> > of
> > MS SQL Server 2000. It is pretty handy when it comes to compare rows of
> > data instead of having to write long boolean expressions.
> > binary_checksum() takes a list of fields and it returns an integer
> > value
> > which sumarize the row content.
>

As noted, you can use the md5(text) function with the || (concat) operator

> On a similar note, I've found myself wanting an extended '=' operator
> meaning
>         (a = b or (a is null and b is null))
>

Setting 'transform_null_equals' to true in postgresql.conf should do
what you want.

--miker

> same goal of course, for more general comparisons...
>
> d.
> --
> David Helgason,
> Business Development et al.,
> Over the Edge I/S (http://otee.dk)
> Direct line +45 2620 0663
> Main line +45 3264 5049
> On 26. sep 2004, at 19:58, Federico Balbi wrote:
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

pgsql-general by date:

Previous
From: frederic.germaneau@bull.net
Date:
Subject: Réf. : Re: R?f. : Re: v8 on AIX5.2
Next
From: Federico Balbi
Date:
Subject: Re: proxying connections