Re: Weird "function does not exist" error.

From: 邓尧 <torshie(at)gmail(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Weird "function does not exist" error.
Date: 2013-11-25 09:59:20
Message-ID: CAOb3iujtG-HKnaAEY0YXuKB_y0tu3n0QbsqMm1AOgiDVMaDaoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My apologies, I connected to the wrong database in my C code ...

Sorry, if this E-mail bothers you.

On Mon, Nov 25, 2013 at 5:33 PM, 邓尧 <torshie(at)gmail(dot)com> wrote:

> Hi,
>
> I ran into a "function .... does not exist" error when invoking a function
> created by myself. What's weird is that the function works perfectly if I
> invoke it through the command line tool "psql" but fails if I invoke it
> through the C API.
>
> The SQL to create the function is:
> CREATE OR REPLACE FUNCTION "lo_select_page"(uid_ BIGINT, lottery_type_ INT,
> type_ INT, time_start_ BIGINT, time_end_ BIGINT,
> page_number_ BIGINT, prize_status_ INT)
> RETURNS SETOF REFCURSOR AS $$
> ...
> END $$ LANGUAGE plpgsql;
>
> The SQL to invoke the function:
> BEGIN;SELECT lo_select_page(4163481095, 0, 0, 0, 1893477600000, 0,
> 0);FETCH ALL IN order_list_cursor; FETCH ALL IN page_count_cursor;COMMIT;
>
> Server version is 9.1, both 9.1 & 9.2 psql works, C API version is 9.2
>
> Any ideas ?
>
> Thanks in advance
> Yao
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2013-11-25 10:10:29 Re: Solution for Synonyms
Previous Message 邓尧 2013-11-25 09:33:51 Weird "function does not exist" error.