Search Postgresql Archives

Re: Postgresql database procedures?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 04, 2010 at 07:38:15AM -0400, zhong ming wu wrote:
> On Wed, Aug 4, 2010 at 7:32 AM, Machiel Richards <machielr@xxxxxxxxx> wrote:
> > Good day all
> >
> > I am looking for some info / resources where I can learn how to
> > write database procedures, functions,etc?

Do you have any particular tasks in mind?  Since PostgreSQL lets you
use the vast majority of common programming languages to do this, it
would be helpful if you mentioned one or more you're familiar with.

It's possible to write VIEWs, which are essentially a way not to write
queries over and over again manually.
http://www.postgresql.org/docs/current/static/sql-createview.html

Next step up would probably be functions in SQL, which are a lot like
VIEWs, only they can take parameters.  As SQL is Turing complete,
functions in SQL can do quite a lot.
http://www.postgresql.org/docs/current/static/xfunc-sql.html

Then there's trigger functions and the associated triggers.
http://www.postgresql.org/docs/current/static/triggers.html

You can keep going from there, up to and including using PostgreSQL
components in some other system :)

> >    I am a total newbie to this and will need to learn from scratch....
> >
> >     Would appreciate the help a lot....

This list is one good place to get help.  Another is the IRC channel
on freenode

irc://irc.freenode.net/postgresql

> > Machiel
> 
> RTFM
> 
> http://www.postgresql.org/docs/8.4/interactive/xplang.html

As The Fine Manual is very extensive, telling people just to Read it
from some arbitrary point is just barely more helpful than not
specifying one, i.e. not terribly.  Perhaps asking a few more
questions would be. :)

Cheers,
David.
-- 
David Fetter <david@xxxxxxxxxx> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@xxxxxxxxx
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux