Re: pl/sql resources for pl/pgsql?

Поиск
Список
Период
Сортировка
Искать
От
Jasen Betts
Тема
Re: pl/sql resources for pl/pgsql?
Дата
Msg-id
h1hrm2$a5h$1@reversiblemaps.ath.cx
Список
Дерево обсуждения
Re: pl/sql resources for pl/pgsql? Jasen Betts <jasen@xnet.co.nz>
Re: pl/sql resources for pl/pgsql? Gurjeet Singh <singh.gurjeet@gmail.com>
Re: pl/sql resources for pl/pgsql? Merlin Moncure <mmoncure@gmail.com>
Re: pl/sql resources for pl/pgsql? Pavel Stehule <pavel.stehule@gmail.com>
Re: pl/sql resources for pl/pgsql? Merlin Moncure <mmoncure@gmail.com>
On 2009-06-16, gvimrc  wrote:
> I'm fairly new to PostgreSQL and completely new to using pl/pgsql
> though I've used MySQL's procedural language a little.
> I heard pl/pgsql is similar to Oracle's pl/sql so would it be possible, 
> given that pl/pgsql literature is a bit thin on the ground, to use books
> on pl/sql for developing pl/pgsql code?

For inspiration perhaps, not as a textbook. 
differences from oracle:
http://www.postgresql.org/docs/8.3/interactive/plpgsql-porting.html

the postgresql manual chapter on pl-pgsql (and the preceeding chapters)
contain all that you really need.

pl-pgsql chapter:
http://www.postgresql.org/docs/8.3/interactive/plpgsql.html
full manual:
http://www.postgresql.org/docs/8.3/interactive/index.html

plpgsql is much like any other procedural language 
only you can embed SQL queries very very easily 

some hints you may find useful:

The syntax checker doesn't always give useful advice when it rejects
your code so develop a habit of step-wise testing.

if you say "IF" and forget to say "THEN" it will lead a confusing
error message.

"ELSIF" (and "ELSEIF") are different to "ELSE IF" in the number of 
"END IF"s youll need to use later.

-- sql comments and 
/* c-style 
comments */ can both be used.

bye.
В списке pgsql-general по дате отправления
От: Uwe C. Schroeder
Дата:
От: Bruce YUAN
Дата:
FAQ