Search Postgresql Archives

Re: Odd query result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 27 Aug 2012 10:55:43 +0200
Maximilian Tyrtania <lists@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>

Attachment: pgpKHg1rtHHGd.pgp
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux