pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How can I retrieve an info about function arguments ?
2+ messages / 2 participants
[nested] [flat]

* How can I retrieve an info about function arguments ?
@ 2002-10-24 11:36  Zuev Dmitry <envoy1@chat.ru>
  0 siblings, 1 reply; 2+ messages in thread

From: Zuev Dmitry @ 2002-10-24 11:36 UTC (permalink / raw)
  To: pgsql-admin

Hello All
Consider a function:
create function f(varchar(10), decimal(10,1)) returns integer as 'select 1;'
language sql;
I need to retreive full set of info about argument and return types (for
variable length too).
How I can get it from system catalog ?
For tables columns I can gen an info from pg_attribute table. But in case of
function no entry are present there.
pg_proc has no info about length of variable length types
__________________________________________________________________ Dmitry
Vitalievitch ICQ#: 11000008 Current ICQ status: + More ways to contact me
__________________________________________________________________





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

* Re: How can I retrieve an info about function arguments ?
@ 2002-10-25 14:25  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Zuev Dmitry <envoy1@chat.ru>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2002-10-25 14:25 UTC (permalink / raw)
  To: Zuev Dmitry <envoy1@chat.ru>; +Cc: pgsql-admin

"Zuev Dmitry" <envoy1@chat.ru> writes:
> Consider a function:
> create function f(varchar(10), decimal(10,1)) returns integer as 'select 1;'

There is no distinction between such a function and a function declared
	create function f(varchar, decimal)
Function arguments do not have length restrictions attached to them.

If they did, we couldn't write functions like numeric_add() and
textcat(), but would need an infinite number of variations of these
for each possible input length.

			regards, tom lane



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


end of thread, other threads:[~2002-10-25 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24 11:36 How can I retrieve an info about function arguments ? Zuev Dmitry <envoy1@chat.ru>
2002-10-25 14:25 ` Tom Lane <tgl@sss.pgh.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