On Fri, Dec 16, 2005 at 03:30:01PM -0500, Tom Lane wrote:
> "Niblett, David A" <[EMAIL PROTECTED]> writes:
> > Is there no way in Postgres that I can simply not return
> > anything so I show zero rows?
> 
> Make the function return SETOF myrec not just myrec.  Then you
> can return zero or one (or more) myrec's.

Dunno if this indicates a possible problem, but the function as
posted fails an assertion in an assert-enabled 8.0.5 server (but
not in 8.1.1 or 8.2devel).

test=> SELECT test(0);
server closed the connection unexpectedly

#2  0x001f7e30 in ExceptionalCondition (conditionName=0x220b10 "!(typeId == ( 
(olddata)->t_choice.t_datum.datum_typeid ))", errorType=0x2208e0 
"FailedAssertion", 
    fileName=0x220868 "tuptoaster.c", lineNumber=830) at assert.c:51
#3  0x00054ac8 in toast_flatten_tuple_attribute (value=2231056, typeId=2230496, 
typeMod=2230376) at tuptoaster.c:830

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to