Re: Odd query result

From: Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Odd query result
Date: 2012-08-27 09:35:53
Message-ID: 20120827113553.a4fe4d7eb8f477cf25292431@frank.uvena.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 27 Aug 2012 10:55:43 +0200
Maximilian Tyrtania <lists(at)contactking(dot)de> wrote:

> Hello from Berlin,
>
> I can't quite make sense of this (running PG 9.0.3):
>
> psql (9.0.3)
> Type "help" for help.
>
> FAKDB=# Select _rowid,f_firmen_isKunde(firmen),bezeichnung::text from
> firmen
> where
> (firmen.bezeichnung='Microsoft Deutschland GmbH'); _rowid |
> f_firmen_iskunde | bezeichnung
> ----------+------------------+----------------------------
> 1214700 | f | Microsoft Deutschland GmbH
> 15779700 | t | Microsoft Deutschland GmbH
> 166300 | t | Microsoft Deutschland GmbH
> (3 rows)
>
> FAKDB=# Select _rowid,f_firmen_isKunde(firmen),bezeichnung::text from
> FAKDB-# firmen where
> FAKDB-# (firmen.bezeichnung='Microsoft Deutschland GmbH') and
> FAKDB-# (f_firmen_isKunde(firmen)=true) and firmen._rowid=15779700 ;
> _rowid | f_firmen_iskunde | bezeichnung
> ----------+------------------+----------------------------
> 15779700 | t | Microsoft Deutschland GmbH
> (1 row)
>
> Fine. But this record won't be found if I omit the last condition.
>
> FAKDB=# Select _rowid,f_firmen_isKunde(firmen),bezeichnung::text from
> firmen
> where
> (firmen.bezeichnung='Microsoft Deutschland GmbH') and
> (f_firmen_isKunde(firmen)=true); _rowid | f_firmen_iskunde |
> bezeichnung
> --------+------------------+----------------------------
> 166300 | t | Microsoft Deutschland GmbH
> (1 row)
>
>
> What might be up there?

How is f_firmen_isKunde() defined?

Cheers,
Frank
--
Frank Lanitz <frank(at)frank(dot)uvena(dot)de>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2012-08-27 09:39:45 Re: Odd query result
Previous Message Greg Williamson 2012-08-27 09:27:19 Re: PGBouncer Connection Using Perl DBI