pgAdmin bug? creating functions

From: Michael Shapiro <mshapiro(at)ncsa(dot)edu>
To: pgadmin-support(at)postgresql(dot)org
Subject: pgAdmin bug? creating functions
Date: 2003-11-14 19:24:55
Message-ID: 5.2.0.9.2.20031114130825.0270cc18@pop.ncsa.uiuc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I am having problems creating functions with PgAdmin. I have searched the
lists at archives.postgresql.org/pgadmin-support, but didn't find anything
about it.

The basic problem appears to be that PgAdmin may not be setting the
search_path properly when it issues its updates. The scenario is this:

I am working in a schema which is neither the public schema nor the name of
the current user. When I try create functions that take arguments that are
table names, postgres says it can't find the table. For example, if the
user is xxx and the schema is sss, the following should work

create or replace function sss.doit(sss.mytable)
...

If I create this function using psql, it works just fine. However, when I
look at the function in PgAdmin, I see this

create or replace function sss.doit(mytable)

(mytable has lost its schema prefix). Mods to the doit function using PgAdmin
result in the following error:

ERROR: Type "packet_tbl" does not exist.

A similar problem occurs when creating triggers. If doit (above) were a
trigger function (ie, returns trigger), PgAdmin lists it in the pulldown
when creating the trigger, but when it tries to create the trigger, the
following error occurs:

ERROR: CreateTrigger: function doit() does not exist.

I think it might be a search path issue that the GUI isn't handling properly.

Any help would be appreciated.

---
Michael

Browse pgadmin-support by date

  From Date Subject
Next Message Devrim GUNDUZ 2003-11-14 21:39:46 Re: Problem with pgAdmin3 on Fedora
Previous Message Andreas Pflug 2003-11-14 17:50:21 Re: many panels are too small