function returning NULL?

Поиск
Список
Период
Сортировка
От Sandro Dentella
Тема function returning NULL?
Дата
Msg-id 20010430105600.B6311@bluff.ermit.it
обсуждение исходный текст
Ответы Re: function returning NULL?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
I'm trying to create a function that should return a date, and occasionally
NULL value. I can't see how to do that. I'm using pl/tcl.

CREATE FUNCTION "start" (text,text) RETURNS date AS '    regsub ^. $1 "$2" job    spi_exec "select start_date from jobs
wherejob_code = ''$job''" { if {[info exist start_date]} {      return $start_date }    }
 
#     return "2/2/2222"  HERE I want NULL    return "2/2/2222"
'LANGUAGE 'pltcl';

That is to say I'd like to have a function that returns a date but under
some circumstancies it leave it blanck.

TIA
sandro
*:-)


-- 
Sandro Dentella  *:-)
e-mail: sandro@ermit.it sandro.dentella@mi.infn.it 


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Sandro Dentella
Дата:
Сообщение: Re: libpgtcl and passwords
Следующее
От: Constantin Teodorescu
Дата:
Сообщение: Re: MULTIPLE OUTER JOIN SYNTAX :-( can't quess it