Re: Catching dangling LOBs?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vitaly Belman <vitalyb(at)gmail(dot)com>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Catching dangling LOBs?
Date: 2005-04-15 22:40:56
Message-ID: 8363.1113604856@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Vitaly Belman <vitalyb(at)gmail(dot)com> writes:
> My bad. Here we go, really simple:

> CREATE OR REPLACE FUNCTION public.bayes_books(float4, int4)
> RETURNS float8 AS
> 'select bayes($1, $2, 5, 3.9)'
^^^^^^^^^^^^
> LANGUAGE 'sql' IMMUTABLE;

> CREATE OR REPLACE FUNCTION functions.bayes(float4, int4, int4, float4)
^^^^^^^^^^^^^^^
> RETURNS float8 AS
> 'select ($2 / ($2+$3::float4)) * $1 + ($3 / ($2+$3::float4)) * $4'
> LANGUAGE 'sql' IMMUTABLE;

I'll bet that the "functions" schema wasn't in your search path when you
did the VACUUM. It would be wiser to write "functions.bayes(...)" in
the bayes_books function, so it wouldn't be context-dependent.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2005-04-15 23:05:26 Re: SQL Question
Previous Message Vitaly Belman 2005-04-15 22:31:08 Re: Catching dangling LOBs?