From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | kachun(at)pathlink(dot)com (Kachun Lee) |
Cc: | hackers(at)postgreSQL(dot)org (PostgreSQL-development) |
Subject: | Re: [SQL] isnull function] |
Date: | 1998-06-27 02:11:56 |
Message-ID: | 199806270211.WAA17393@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
>
> I tried, but the following code does not seem to work:
>
> #include <string.h>
> #include <stdio.h>
> #include "postgres.h"
> #include "libpq-fe.h"
> #include "utils/dt.h"
>
> DateTime * is_null(DateTime *, DateTime *);
>
> DateTime * is_null (DateTime * dt, DateTime * def)
> {
> return dt ? dt : def;
> }
>
> I searched the doc/maillist, and I could not find how to test an arg for
> NULL value. Should I post this to HACKER?
>
>
Having DateTime* be a NULL does not represent a NULL value in SQL
internally.
Not sure how to do it, because I don't rememeber where the NULL checking
is done.
--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-06-27 05:14:38 | Re: [HACKERS] Problem after removal of exec(), help |
Previous Message | Brett McCormick | 1998-06-27 01:35:44 | operator error |
From | Date | Subject | |
---|---|---|---|
Next Message | James Olin Oden | 1998-06-27 10:29:30 | Re: [SQL] isnull function] |
Previous Message | Kachun Lee | 1998-06-26 23:45:54 | Re: [SQL] Date fields and libpq.... |