Search Postgresql Archives

Re: PL/pgSQL Function Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 16, 2005 at 03:30:01PM -0500, Tom Lane wrote:
> "Niblett, David A" <niblettda@xxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux