pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedQuestion re: null
2+ messages / 2 participants
[nested] [flat]
* Question re: null
@ 1998-09-22 17:37 Colin Dick <cdick@mail.ocis.net>
0 siblings, 1 reply; 2+ messages in thread
From: Colin Dick @ 1998-09-22 17:37 UTC (permalink / raw)
To: pgsql-sql
I have written a function that will return an integer based on the length
of a given field defined as text.
It seems that if the given field has not yet been populated (ie: it is
null), my function returns nothing. I have tried expressly sending back a
value as such to no avail:
int isempty(text*)
{
return (100);
}
If the text* is null, it does not return 100 though it does seem to
process the function and does not core dump. (ie: returns blank entries
with the proper number of tuples at the end). Any ideas? Thanks again.
--
Colin Dick
On Call Internet Services
cdick@mail.ocis.net
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] Question re: null
@ 1998-09-23 15:25 Sferacarta Software <sferac@bo.nettuno.it>
parent: Colin Dick <cdick@mail.ocis.net>
0 siblings, 0 replies; 2+ messages in thread
From: Sferacarta Software @ 1998-09-23 15:25 UTC (permalink / raw)
To: pgsql-sql@postgresql.org, Colin Dick <cdick@mail.ocis.net>; +Cc: pgsql-hackers@postgresql.org
Hello Colin,
martedì, 22 settembre 98, you wrote:
CD> I have written a function that will return an integer based on the length
CD> of a given field defined as text.
CD> It seems that if the given field has not yet been populated (ie: it is
CD> null), my function returns nothing. I have tried expressly sending back a
CD> value as such to no avail:
CD> int isempty(text*)
CD> {
CD> return (100);
CD> }
CD> If the text* is null, it does not return 100 though it does seem to
CD> process the function and does not core dump. (ie: returns blank entries
CD> with the proper number of tuples at the end). Any ideas? Thanks again.
I'm very interesting on this subject too.
Does anybody knows how to solve this question ?
I can't belive that we are the only people having problems
with NULLs. ;)
Jose'
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1998-09-23 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-22 17:37 Question re: null Colin Dick <cdick@mail.ocis.net>
1998-09-23 15:25 ` Sferacarta Software <sferac@bo.nettuno.it>
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