Re: Unable to run this query

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Unable to run this query
Дата
Msg-id AANLkTimM6V3l825vygoiyIvevTaF99e8_MT-j16czI63@mail.gmail.com
обсуждение исходный текст
Ответ на Unable to run this query  (Srikanth Kata <srikanth@inventum.net>)
Список pgsql-general
2010/7/5 Srikanth Kata <srikanth@inventum.net>:
>
> I am not able to run this query in Postgres 8.4 and the OS is Linux Centos 5.
>
> I have dump of the DB, but in clients place this query is taking lots of
> time but no errors.
>
> Please suggest me what is the case to rectify this error.
>
> select
> s.*,a.actid,a.phone,d.domid,d.domname,d.domno,a.actno,a.actname,p.descr
> as svcdescr from vwsubsmin s
> inner join packages p on s.svcno=p.pkgno
> inner join account a on a.actno=s.actno
> inner join ssgdom d on a.domno=d.domno
> inner join (select subsno from getexpiringsubs($1,cast($2 as
> integer),cast($3 as double precision), $4) as
> (subsno int,expirydt timestamp without time zone,balcpt double precision))
> as e on s.subsno=e.subsno
> where s.status<=15 and d.domno=$5
> order by d.domname,s.expirydt,a.actname
>
> It is showing the error as ERROR:  THERE IS NO PARAMETER $1
> LINE 1: ...no inner join (select subsno from getexpiringsubs($1,cast($2..

probably use a wrong API. Your query uses parameters - $1, $2, ... but
you are not define these parameters in your code.

Regards
Pavel Stehule

> --
> View this message in context: http://old.nabble.com/Unable-to-run-this-query-tp29073430p29073430.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

В списке pgsql-general по дате отправления:

Предыдущее
От: Srikanth Kata
Дата:
Сообщение: Unable to run this query
Следующее
От: Saitenheini@web.de
Дата:
Сообщение: Re: C-Functions using SPI - Missing Magic Block