[SQL] Difference between is true and = 't' in boolean feild. & bitmap indexes

2002-08-16 Thread Rajesh Kumar Mallah.
Any can anyone explain me why in a query of a boolean feild "is ture" does not indexes where as = 't' does? is "is true" not a more standard SQL than " = 't' ". Also is there any working implementation of BITMAP INDEXES in postgresql as found in ORACLE? regds mallah. tradein_clients=> ex

Re: [SQL] Results from EXECUTE

2002-08-16 Thread Janning Vygen
Am Freitag, 16. August 2002 18:26 schrieb Alexander M. Pravking: > How can I obtain results from an EXECUTE statement > within a pl/PgSQL function? >From the docs: plpgsql-statements.html postgres 7.2.1 "The results from SELECT queries are discarded by EXECUTE, and SELECT INTO is not currently

[SQL] Results from EXECUTE

2002-08-16 Thread Alexander M. Pravking
How can I obtain results from an EXECUTE statement within a pl/PgSQL function? E.g., something like value := EXECUTE ''SELECT '' || quote_ident(field_name) || '' FROM ...''; Thanks in advice. -- Fduch M. Pravking ---(end of broadcast)--- TIP 3:

Re: [SQL] references definition to multi-field primary key

2002-08-16 Thread Bruno Wolff III
On Fri, Aug 16, 2002 at 16:15:57 +0100, Gary Stainburn <[EMAIL PROTECTED]> wrote: > > I only want the insert to work if prpid matches pgpid and prnozzle matches > pgnozzle. There are several typos in your sample that make it hard to know for sure what you want to do. However I suspect you jus

[SQL] references definition to multi-field primary key

2002-08-16 Thread Gary Stainburn
Hi all, I've got some fuel pumps, each of which sell a number of fuel grades - one nozzle per grade, each nozzle connected to a specified tank containing that grade. I can define the tanks, the pump numbers, and the pump grade/nozzle config using the tables below. create table grades ( -- di

Re: [SQL] Casting integer to boolean

2002-08-16 Thread Christopher Kings-Lynne
> select not count(*) = 0 from my_table; > > Basically, for any integer i, convert to boolean with: not i = 0 Or i != 0 of course... Chris ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "

Re: [SQL] Casting integer to boolean

2002-08-16 Thread Tod McQuillin
On Fri, 16 Aug 2002, Bhuvan A wrote: > How do i cast an integer value to boolean? You can always do something like this: select not count(*) = 0 from my_table; Basically, for any integer i, convert to boolean with: not i = 0 -- Tod McQuillin ---(end of broadcast)---

[SQL] Casting integer to boolean

2002-08-16 Thread Bhuvan A
Hi, I am using postgresql 7.2.1. How do i cast an integer value to boolean? I did try the below sequence of SQLs and was little bit confused, by the way it behaves. It casts the integer value to boolean in one case but not ever again. bhuvan=> SELECT count(*)::int::boolean from my_table; ERROR: