Re: how plsql work on postgresql

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: how plsql work on postgresql
Дата
Msg-id CAKFQuwZny-CHcC+TOvqozBYmOcE+pS=cZ6SUj1p_ekCLEpUyOA@mail.gmail.com
обсуждение исходный текст
Ответ на how plsql work on postgresql  (Selina Tech <swucareer99@gmail.com>)
Ответы Re: how plsql work on postgresql  (Michael Moore <michaeljmoore@gmail.com>)
Список pgsql-sql
On Tue, Mar 29, 2016 at 3:57 PM, Selina Tech <swucareer99@gmail.com> wrote:
Hi, All

         I just start to learn plsql and plpgsql. There are a lot of comparison of pl/sql and pl/pgsql available online. I am wondering why plsql work well on Postgresql and how it work? Is the code converted to plpgsql code? 
           If use postgresql database server, which one is better between plsql and pl/pgsql?


Your feedback is highly appreciated.


​It isn't "plsql", just "SQL" - but I might be losing something in the translation.  "pl/sql" is an Oracle thing that is indeed like "pl/pgsql" - but "pl/sql" does not directly work, let alone well, on PostgreSQL...

Anyway, writing a function in "LANGUAGE sql" means you are limited to only those things SQL can do.  Using pl/pgsql gives you access to the power of procedural logic among other things.

There is no "better" - but the general rule is if it can be done using SQL then do so since you are likely to see better performance.  When you need to do something SQL cannot do then consider pl/pgsql.

David J.

В списке pgsql-sql по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: how plsql work on postgresql
Следующее
От: Michael Moore
Дата:
Сообщение: Re: how plsql work on postgresql