Re: Display a function - Mailing list pgsql-novice

From Joel Rodrigues
Subject Re: Display a function
Date
Msg-id 854964B8-F732-11D6-8BB2-0005024EF27F@Phreaker.net
Whole thread Raw
In response to Re: Display a function  (Joel Rodrigues <borgempath@Phreaker.net>)
List pgsql-novice
On Sunday, November 10, 2002, at 11:19 , Joel Rodrigues wrote:

> On Wednesday, November 6, 2002, at 10:03 , Setyo Nugroho wrote:
>
>> Hi all,
>> How is it to display the listing/ descriptions of a function
>> or a table
>> created using plpgsql or using database client such as psql?
>>
>> Regards
>> Setyo Nugroho
>>
>
> Hi, I haven't tried it (yet), but there are instructions for
> this in PostgreSQL Notes by Richard Huxton.
> <http://www.archonet.com/pgdocs/pgnotes.html>
>
> It's in Chapter 10, Dealing with the system tables: "Viewing
> triggers and their functions".
>
> Cheers,
> Joel

Well, I tried it myself and it doesn't work (yet).

This is Huxton's code:

SELECT cl.relname,tr.tgname AS triggername, tr.tgenabled,
fn.proname AS func_name
FROM pg_trigger AS tr, pg_class AS cl, pg_proc AS fn
WHERE tr.tgrelid=cl.oid AND tr.tgfoid=fn.oid AND cl.relname ˜
'^foo%';


This is the result :

ERROR:  parser: parse error at or near "˜"
psql:showfunc.sql:3: ERROR:  parser: parse error at or near "˜"

I'm pretty certain *I* am doing something wrong.

- Joel



pgsql-novice by date:

Previous
From: "Jules Alberts"
Date:
Subject: Re: SQL statement to copy a result set to create another table
Next
From: Joel Rodrigues
Date:
Subject: using functions to generate custom error messages