Re: Help with "empty()"

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Alan Wayne <alanjwayne(at)yahoo(dot)com>
Cc: Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help with "empty()"
Date: 2002-05-24 04:14:50
Message-ID: 20020523211220.H73885-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> In doing table validation, I have often used the
> foxpro function "empty()" which returns .t. if the
> enclosed entity is empty. i.e., if boolean .f. then
> empty = .t.. If number 0, then empty = .t., and if a
> blank string, then empty = .t.
>
> I didn't see anyother way to mimic this behavior then
> what I wrote below, is there a better way????

I'd have suggested writing empty functions for various
types, empty(boolean), empty(int4), empty(float8),
empty(text) and using those. You could probably even
just do them as sql functions.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-24 04:23:42 Re: Pg_dump and huge OID's
Previous Message Alan Wayne 2002-05-24 03:57:25 Help with "empty()"