pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: kachun@pathlink.com
Cc: hackers@postgreSQL.org
Subject: Re: [SQL] isnull function]
Date: Fri, 26 Jun 1998 22:11:56 -0400 (EDT)
Message-ID: <199806270211.WAA17393@candle.pha.pa.us> (raw)
In-Reply-To: <3.0.1.32.19980626133317.006bc8cc@rr.pathlink.com>

> 
> 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@candle.pha.pa.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)



view thread (8+ messages)  latest in thread

Message-ID: <199806270211.WAA17393@candle.pha.pa.us>
Permalink:  ../199806270211.WAA17393@candle.pha.pa.us/
Also on:    postgresql.org/message-id/199806270211.WAA17393@candle.pha.pa.us

 · 

reply

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: maillist@candle.pha.pa.us, kachun@pathlink.com, hackers@postgreSQL.org
  Subject: Re: [SQL] isnull function]
  In-Reply-To: <199806270211.WAA17393@candle.pha.pa.us>

* 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