Re: Function created yet not found - Mailing list pgsql-general

From Fran Fabrizio
Subject Re: Function created yet not found
Date
Msg-id 3C8FCC48.5000107@mmrd.com
Whole thread Raw
In response to Function created yet not found  (Fran Fabrizio <ffabrizio@mmrd.com>)
List pgsql-general
Call off the dogs. =)

I dug deeper, and found that it wasn't the function that was throwing
the error, but the table it was selecting from.  Examining the table
further....

test=# \d entity
               Table "entity"
  Attribute |       Type        | Modifier
-----------+-------------------+----------
  entity_id | integer           |
  name      | character varying |
  type      | character varying |
  active    | boolean           |
  lft       | integer           |
  rgt       | integer           |
Indices: entity_findsite_idx,
          entity_lft_rgt_idx,
          entity_rgt_idx

entity_findsite_idx looked odd to me, not my usual naming scheme.
Co-worker had tested making an index using a function: 'create index
entity_findsite_idx on entity (findsite(entity_id))'.  I had since
dropped and reloaded that function, rendering the table useless.

My apologies for prematurely posting.  I've never used function-based
indices....would a select findsite(entity_id) from entity actually have
used that index?  That could be handy.

Thanks,
Fran


pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: more about pg_toast growth
Next
From: Bruce Momjian
Date:
Subject: Re: Query planner problem