Re: Problem either with PostgreSQL or with PHP

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tuo Pe <tuo_pe(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem either with PostgreSQL or with PHP
Date: 2010-04-07 16:17:19
Message-ID: 16338.1270657039@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tuo Pe <tuo_pe(at)yahoo(dot)com> writes:
> I have written this function in PL/pgSQL,
> CREATE OR REPLACE FUNCTION MakeSimpleReservation(integer, integer, integer, text, text) RETURNS boolean ...

> On psql, I can run a command such as

> select * from MakeSimpleReservation(2, 30, 1, '2010-04-12 11:00:00', '2010-04-12 14:00:00');

> without any problems, but when I try to run it via PHP, I get this error message:

> ERROR: function makesimplereservation(integer, integer, integer, unknown, unknown) does not exist LINE 1: SELECT MakeSimpleReservation(2, 3, 1, '2010-04-12 11:00:00' ... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.

Hmm. That function should match that call. Are you sure php is
connecting to the same database you created the function in? Or maybe
you created the function in a schema that is not in the php client's
search_path?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message tv 2010-04-07 16:22:39 Re: Problem either with PostgreSQL or with PHP
Previous Message Scott Marlowe 2010-04-07 16:13:26 Re: Problem either with PostgreSQL or with PHP