Functions question

Started by Linn Kublerover 23 years ago4 messagesgeneral
Jump to latest
#1Linn Kubler
LKubler@ecw.org

Hi,

Just wondering, is there a way to see a function from within psql? I
was looking at the \? command list and found \df but that didn't seem to
work. I created a function, ins_news(), and when I typed \df ins_news()
it came back and said zero rows. Using pgadmin II on a windows
workstation I can see the function I created and the function works so I
know it's there but how can I list out the function? There must be a
way since it is listed in pgadmin.

Thanks in advance,
Linn

#2Darren Ferguson
darren@crystalballinc.com
In reply to: Linn Kubler (#1)
Re: Functions question

\df ins_news do not ue the brackets

hth

On Mon, 19 Aug 2002, Linn Kubler wrote:

Hi,

Just wondering, is there a way to see a function from within psql? I
was looking at the \? command list and found \df but that didn't seem to
work. I created a function, ins_news(), and when I typed \df ins_news()
it came back and said zero rows. Using pgadmin II on a windows
workstation I can see the function I created and the function works so I
know it's there but how can I list out the function? There must be a
way since it is listed in pgadmin.

Thanks in advance,
Linn

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
Darren Ferguson

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Linn Kubler (#1)
Re: Functions question

"Linn Kubler" <LKubler@ecw.org> writes:

I created a function, ins_news(), and when I typed \df ins_news()
it came back and said zero rows.

Try it without the parens:

\df ins_news

regards, tom lane

#4Linn Kubler
LKubler@ecw.org
In reply to: Tom Lane (#3)
Re: Functions question

Thanks to all who replied. That explains it my function returns opaque,
is there another command that will show a function that returns opaque?

Thanks,
Linn

"Ian Harding" <ianh@tpchd.org> 08/19/02 05:26PM >>>

\df accepts regular expressions. Try

\df ins.*

or better yet,

\df ins_news

Also, \df will not show functions returning opaque.

"Linn Kubler" <LKubler@ecw.org> 08/19/02 03:22PM >>>

Hi,

Just wondering, is there a way to see a function from within psql? I
was looking at the \? command list and found \df but that didn't seem
to
work. I created a function, ins_news(), and when I typed \df
ins_news()
it came back and said zero rows. Using pgadmin II on a windows
workstation I can see the function I created and the function works so
I
know it's there but how can I list out the function? There must be a
way since it is listed in pgadmin.

Thanks in advance,
Linn

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)