pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how to check presence of a function and set permissions?
3+ messages / 3 participants
[nested] [flat]

* how to check presence of a function and set permissions?
@ 2001-05-21 08:33  Bruno Boettcher <bboett@erm1.u-strasbg.fr>
  0 siblings, 1 reply; 3+ messages in thread

From: bboett@erm1.u-strasbg.fr @ 2001-05-21 08:33 UTC (permalink / raw)
  To: pgsql-sql

hello!

since i am now destroying and recreating my functions at every request
(due to the fact that pl/psql can't cope with dynamic table names, and i
didn't found anywhere a decent doc about pl/perl) i have now the
problem, that a psql error is displayed if i try to drop  a nonexistent
function, or sometimes when i created the function through psql an
ownership error, giving a permission denied to drop that function...

so is there a way to check before dropping if a function exists, and is
it possible to ovverride the ownership of a function? do the same GRANT
mechanisms aply to functions (at least the syntax has to change a
bit...)?

-- 
ciao bboett
==============================================================
bboett@earthling.net
http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: how to check presence of a function and set permissions?
@ 2001-05-21 08:54  Tod McQuillin <devin@spamcop.net>
  parent: Bruno Boettcher <bboett@erm1.u-strasbg.fr>
  0 siblings, 1 reply; 3+ messages in thread

From: Tod McQuillin @ 2001-05-21 08:54 UTC (permalink / raw)
  To: Bruno Boettcher <bboett@erm1.u-strasbg.fr>; +Cc: pgsql-sql

On Mon, 21 May 2001, Bruno Boettcher wrote:

> since i am now destroying and recreating my functions at every request
> (due to the fact that pl/psql can't cope with dynamic table names,

I don't know about the rest of your question but I believe PostgreSQL
supports dynamic queries in plpgsql since v7.1 --

EXECUTE 'SELECT * FROM ' || table_name || ' WHERE whatever';

However, I do not see it in the documentation, so now I'm not 100%
certain.
-- 
Tod McQuillin





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: how to check presence of a function and set permissions?
@ 2001-05-22 04:15  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Tod McQuillin <devin@spamcop.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2001-05-22 04:15 UTC (permalink / raw)
  To: Tod McQuillin <devin@spamcop.net>; +Cc: Bruno Boettcher <bboett@erm1.u-strasbg.fr>; pgsql-sql


I see EXECUTE in the PL/PgSQL manual.

> On Mon, 21 May 2001, Bruno Boettcher wrote:
> 
> > since i am now destroying and recreating my functions at every request
> > (due to the fact that pl/psql can't cope with dynamic table names,
> 
> I don't know about the rest of your question but I believe PostgreSQL
> supports dynamic queries in plpgsql since v7.1 --
> 
> EXECUTE 'SELECT * FROM ' || table_name || ' WHERE whatever';
> 
> However, I do not see it in the documentation, so now I'm not 100%
> certain.
> -- 
> Tod McQuillin
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-05-22 04:15 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-21 08:33 how to check presence of a function and set permissions? Bruno Boettcher <bboett@erm1.u-strasbg.fr>
2001-05-21 08:54 ` Tod McQuillin <devin@spamcop.net>
2001-05-22 04:15   ` Bruce Momjian <pgman@candle.pha.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox