Skip site navigation (1) Skip section navigation (2)

Re: bug?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: John Liu <johnl(at)synthesys(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: bug?
Date: 2002-11-12 16:34:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Tue, 12 Nov 2002, John Liu wrote:

> Hi, Tom,
> we're using version 7.2.
> I've a document table, the cdi column is indexed.
> I tried to do a query by using cdi in two ways -
> 1. the simple query as expected is using index scan
> edbs=# explain select emrxid from document where cdi='1031-15402';
> Index Scan using document_cdi_key on document  (cost=0.00..4.43 rows=1
> width=27)
> 2. the one using plsql function is not using index scan!
> edbs=# explain select getEmrxid('1031-15402') from document;

These two queries don't do the same thing.
The first gets presumably one emrxid from the table at the particular row.
The second gets one copy of that emrxid from each row in document.
I think you want:
 select getEmrxid('1031-15402');

In response to

  • bug? at 2002-11-12 15:59:27 from John Liu

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2002-11-12 18:56:39
Subject: Bug #814: ArrayIndexOutOfBoundsException with extended character data
Previous:From: John LiuDate: 2002-11-12 15:59:27
Subject: bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group