Re: Simple function closes connection to server

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "T- Bone" <jbowen333(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org, dmitry(at)taurussoft(dot)org
Subject: Re: Simple function closes connection to server
Date: 2005-04-11 16:37:28
Message-ID: 2541.1113237448@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"T- Bone" <jbowen333(at)hotmail(dot)com> writes:
> However, when I execute it as follows, my connection to the db gets closed
> and, obviously, there is no result. In fact, it appears that ALL
> connections are closed (this is not good).

> SELECT "ZoneID", "getZoneName"("ZoneID"::text) AS "ZoneName"
> FROM "tblOrganisation";

Do you have any NULL entries in the ZoneID column? It looks to me like
the uniqueidentifier package fails to declare its functions as STRICT,
and since most of them aren't actually coded to check for null input
values, they'll crash on nulls. In particular uniqueidentifier_text
will.

My recommendation would be to mark all those functions as strict
(and get rid of the tests for null input that do exist in a couple).

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-04-12 05:34:05 Re: Postgres startup
Previous Message brew 2005-04-11 16:13:58 Re: Creating DataBases on Suse LINUX Platform