pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Actual function name
3+ messages / 2 participants
[nested] [flat]

* Actual function name
@ 2003-09-25 14:13 Gaetano Mendola <mendola@bigfoot.com>
  2003-09-25 14:43 ` Re: Actual function name Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Gaetano Mendola @ 2003-09-25 14:13 UTC (permalink / raw)
  To: pgsql-admin

Hi all,
is there a way to know the name of current function,
somethink like $0 for a shell script ?


Regards
Gaetano Mendola




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

* Re: Actual function name
  2003-09-25 14:13 Actual function name Gaetano Mendola <mendola@bigfoot.com>
@ 2003-09-25 14:43 ` Peter Eisentraut <peter_e@gmx.net>
  2003-09-25 15:10   ` Re: Actual function name Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Peter Eisentraut @ 2003-09-25 14:43 UTC (permalink / raw)
  To: Gaetano Mendola <mendola@bigfoot.com>; +Cc: pgsql-admin

Gaetano Mendola writes:

> is there a way to know the name of current function,
> somethink like $0 for a shell script ?

In a C function, you can get the OID of the function from
fcinfo->flinfo->fn_oid.  From that you can get the name and the argument
types.

-- 
Peter Eisentraut   peter_e@gmx.net




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

* Re: Actual function name
  2003-09-25 14:13 Actual function name Gaetano Mendola <mendola@bigfoot.com>
  2003-09-25 14:43 ` Re: Actual function name Peter Eisentraut <peter_e@gmx.net>
@ 2003-09-25 15:10   ` Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Gaetano Mendola @ 2003-09-25 15:10 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Peter Eisentraut <peter_e@gmx.net>

Peter Eisentraut wrote:

 > Gaetano Mendola writes:
 >
 >
 >>is there a way to know the name of current function,
 >>somethink like $0 for a shell script ?
 >
 >
 > In a C function, you can get the OID of the function from
 > fcinfo->flinfo->fn_oid.  From that you can get the name and the argument
 > types.
 >

I'm inside a plpgsql function unfortunately, I was confident on use $0 
but on postgres 7.3.X doesn't work.

I think that may be is a TODO ?


Gaetano





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


end of thread, other threads:[~2003-09-25 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-09-25 14:13 Actual function name Gaetano Mendola <mendola@bigfoot.com>
2003-09-25 14:43 ` Peter Eisentraut <peter_e@gmx.net>
2003-09-25 15:10   ` Gaetano Mendola <mendola@bigfoot.com>

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