Re: Re: PL/PG SQL: select count(*) into <var> from <ANY VIEW> where <cond> - does not compute the where cond - returns always total count

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: PL/PG SQL: select count(*) into <var> from <ANY VIEW> where <cond> - does not compute the where cond - returns always total count
Date: 2009-09-23 10:25:15
Message-ID: 20090923102515.GB3662@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to Abraham, Danny :
> Any idea?

Apparently no, because nobody can reproduce your problem.
See my other post, supplementary:

test=*# create view view_o as select * from o;
CREATE VIEW
test=*# create or replace function my_count() returns int as $$declare c
int;begin select into c count(1) from view_o where i=2; return c;
end;$$language plpgsql;
CREATE FUNCTION
test=*# select * from my_count();
my_count
----------
1
(1 row)

Regards, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-09-23 10:28:24 Re: Where can I find detail information about constraint ?
Previous Message 纪晓曦 2009-09-23 10:23:19 Where can I find detail information about constraint ?