Thread: Display listings
Hi all, How is it to display the listings/ detailed descriptions of a function or a table created using plpgsql or using database client such as psql? Regards Setyo Nugroho
Setyo, > How is it to display the listings/ detailed descriptions of a > function > or a table created using plpgsql or using database client such as > psql? Check out the \d commands through PSQL: \dt gives you a listing of all tables \df gives you a listing of all functions \d table-name gives you a schema of the table \d function-name gives you a list of parameters etc. Typing "\?" on the PSQL command line will show you more options. -Josh
And how can I see the source code of the function made by me? > > > How is it to display the listings/ detailed descriptions of a > > function > > or a table created using plpgsql or using database client such as > > psql? > > Check out the \d commands through PSQL: > > \dt gives you a listing of all tables > \df gives you a listing of all functions > \d table-name gives you a schema of the table > \d function-name gives you a list of parameters > etc. > > Typing "\?" on the PSQL command line will show you more options. >
On Thu, 2002-11-07 at 06:04, cristi wrote: > And how can I see the source code of the function made by me? SELECT prosrc FROM pg_proc WHERE proname = 'your_function_name'; -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Jesus said unto her, I am the resurrection, and the life; he that believeth in me, though he were dead, yet shall he live." John 11:25
> > And how can I see the source code of the function made by me? > > SELECT prosrc FROM pg_proc WHERE proname = 'your_function_name'; Yes! Thank you! And for RULES and TRIGGERS ?
On Thu, 2002-11-07 at 08:05, cristi wrote: > > > And how can I see the source code of the function made by me? > > > > SELECT prosrc FROM pg_proc WHERE proname = 'your_function_name'; > > Yes! > Thank you! > > And for RULES and TRIGGERS ? There are the tables pg_rules and pg_triggers... Use \dS to get a list of all system tables. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Jesus said unto her, I am the resurrection, and the life; he that believeth in me, though he were dead, yet shall he live." John 11:25