学习PostgreSQL存储过程的最佳方法是什么?

时间:2022-04-07 23:42:37

Is there a good tutorial or something similar for learning how to write Stored Procedures (for a PostgreSQL database). I'm a definite newbie when it comes to writing Stored Procedures at all, so the clearer and simpler things are explained, the better...

是否有一个很好的教程或类似的东西学习如何编写存储过程(对于PostgreSQL数据库)。在谈到编写存储过程时,我是一个明确的新手,所以更清楚,更简单的事情被解释,越好......

Thanks in advance...

提前致谢...

2 个解决方案

#1


You almost had it, but better start here plpgsql

你几乎拥有它,但最好从这里开始plpgsql

Some will point that PL/pgSQL is not the only way to write Stored Procedures for PostgreSQL and they will be right (that's one of the advantages of Postgres), but on the other hand PL/pgSQL is nice and relatively easy to start with.

有人会指出PL / pgSQL不是为PostgreSQL编写存储过程的唯一方法,它们是正确的(这是Postgres的优点之一),但另一方面PL / pgSQL很好并且相对容易入手。

#2


Note that obviously, here's a good place to start:sql-createfunction

请注意,显然,这是一个很好的起点:sql-createfunction

#1


You almost had it, but better start here plpgsql

你几乎拥有它,但最好从这里开始plpgsql

Some will point that PL/pgSQL is not the only way to write Stored Procedures for PostgreSQL and they will be right (that's one of the advantages of Postgres), but on the other hand PL/pgSQL is nice and relatively easy to start with.

有人会指出PL / pgSQL不是为PostgreSQL编写存储过程的唯一方法,它们是正确的(这是Postgres的优点之一),但另一方面PL / pgSQL很好并且相对容易入手。

#2


Note that obviously, here's a good place to start:sql-createfunction

请注意,显然,这是一个很好的起点:sql-createfunction