agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
how plsql work on postgresql
7+ messages / 5 participants
[nested] [flat]

* how plsql work on postgresql
@ 2016-03-29 22:57  Selina Tech <swucareer99@gmail.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Selina Tech @ 2016-03-29 22:57 UTC (permalink / raw)
  To: pgsql-sql

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.

Sincerely,
Selina

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: how plsql work on postgresql
@ 2016-03-29 23:16  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Selina Tech <swucareer99@gmail.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Adrian Klaver @ 2016-03-29 23:16 UTC (permalink / raw)
  To: Selina Tech <swucareer99@gmail.com>; pgsql-sql

On 03/29/2016 03:57 PM, Selina Tech 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?

I find myself using pl/pgsql more then plsql(assuming you mean 
this(http://www.postgresql.org/docs/9.5/interactive/xfunc-sql.html)) 
just because pl/pgsql offers more ways to manipulate data. FYI, there 
are languages available e.g. pl/pythonu, pl/perl, pl/tcl. pl/java, etc.

Some resources:

http://www.postgresql.org/docs/9.5/interactive/plpgsql-porting.html

http://ora2pg.darold.net/documentation.html#plsql_to_plpsql_convertion
>
>
> Your feedback is highly appreciated.
>
> Sincerely,
> Selina


-- 
Adrian Klaver
adrian.klaver@aklaver.com


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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: how plsql work on postgresql
@ 2016-03-29 23:19  David G. Johnston <david.g.johnston@gmail.com>
  parent: Selina Tech <swucareer99@gmail.com>
  1 sibling, 1 reply; 7+ messages in thread

From: David G. Johnston @ 2016-03-29 23:19 UTC (permalink / raw)
  To: Selina Tech <swucareer99@gmail.com>; +Cc: 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.

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: how plsql work on postgresql
@ 2016-03-30 15:23  Michael Moore <michaeljmoore@gmail.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Michael Moore @ 2016-03-30 15:23 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Selina Tech <swucareer99@gmail.com>; pgsql-sql

On Tue, Mar 29, 2016 at 4:19 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

> 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.
>
> Like David has said, it is not clear what you are talking about.

   - PL/SQL runs only on an Oracle DB
   - SQL - there is a Postgres version for Postgres and an Oracle version
   for Oracle
   - SPL - This is a language that is added on to Postgres and it is
   intended to be as much like Oracle PL/SQL as is possible. It allows people
   to migrate from Oracle to Postgres with minimal changes to code.
   - PL/PGSQL this is Postgres only. It is kind of like PL/SQL but also
   very different. I prefer this over SPL because, IMO, it performs better.

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: how plsql work on postgresql
@ 2016-03-30 15:37  Thomas Kellerer <spam_eater@gmx.net>
  parent: Michael Moore <michaeljmoore@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Thomas Kellerer @ 2016-03-30 15:37 UTC (permalink / raw)
  To: pgsql-sql

Michael Moore schrieb am 30.03.2016 um 17:23:
> Like David has said, it is not clear what you are talking about. 
> 
>   * PL/SQL runs only on an Oracle DB
>   * SQL - there is a Postgres version for Postgres and an Oracle version for Oracle
>   * SPL - This is a language that is added on to Postgres and it is intended to be as much like Oracle PL/SQL as is possible. 
>     It allows people to migrate from Oracle to Postgres with minimal changes to code.
>   * PL/PGSQL this is Postgres only. It is kind of like PL/SQL but also very different. I prefer this over SPL because, IMO, it performs better. 
> 

I have never heard of SPL. Is that a separate module? Where is that available? 




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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: how plsql work on postgresql
@ 2016-03-30 17:13  Michael Moore <michaeljmoore@gmail.com>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 1 reply; 7+ messages in thread

From: Michael Moore @ 2016-03-30 17:13 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-sql

On Wed, Mar 30, 2016 at 8:37 AM, Thomas Kellerer <spam_eater@gmx.net> wrote:

> Michael Moore schrieb am 30.03.2016 um 17:23:
> > Like David has said, it is not clear what you are talking about.
> >
> >   * PL/SQL runs only on an Oracle DB
> >   * SQL - there is a Postgres version for Postgres and an Oracle version
> for Oracle
> >   * SPL - This is a language that is added on to Postgres and it is
> intended to be as much like Oracle PL/SQL as is possible.
> >     It allows people to migrate from Oracle to Postgres with minimal
> changes to code.
> >   * PL/PGSQL this is Postgres only. It is kind of like PL/SQL but also
> very different. I prefer this over SPL because, IMO, it performs better.
> >
>
> I have never heard of SPL. Is that a separate module? Where is that
> available?
>
>

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

Thomas,
It is the language that EnterpriseDB uses. The EnterpriseDB web site
appears to be down but here is another link to some information:
http://www.praetoriate.com/t_edb_block_structure.htm

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: how plsql work on postgresql
@ 2016-03-30 17:56  Selina Tech <swucareer99@gmail.com>
  parent: Michael Moore <michaeljmoore@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Selina Tech @ 2016-03-30 17:56 UTC (permalink / raw)
  To: pgsql-sql

Hi, All:
     I tried to ask why "LANGUAGE sql" work on postgresql.   Thanks for
your reply. Those answer are very helpful.

Sincerely,
Selina

On Wed, Mar 30, 2016 at 10:13 AM, Michael Moore <michaeljmoore@gmail.com>
wrote:

>
>
> On Wed, Mar 30, 2016 at 8:37 AM, Thomas Kellerer <spam_eater@gmx.net>
> wrote:
>
>> Michael Moore schrieb am 30.03.2016 um 17:23:
>> > Like David has said, it is not clear what you are talking about.
>> >
>> >   * PL/SQL runs only on an Oracle DB
>> >   * SQL - there is a Postgres version for Postgres and an Oracle
>> version for Oracle
>> >   * SPL - This is a language that is added on to Postgres and it is
>> intended to be as much like Oracle PL/SQL as is possible.
>> >     It allows people to migrate from Oracle to Postgres with minimal
>> changes to code.
>> >   * PL/PGSQL this is Postgres only. It is kind of like PL/SQL but also
>> very different. I prefer this over SPL because, IMO, it performs better.
>> >
>>
>> I have never heard of SPL. Is that a separate module? Where is that
>> available?
>>
>>
>
>>
>>
>> --
>> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-sql
>>
>
> Thomas,
> It is the language that EnterpriseDB uses. The EnterpriseDB web site
> appears to be down but here is another link to some information:
> http://www.praetoriate.com/t_edb_block_structure.htm
>
>
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2016-03-30 17:56 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 22:57 how plsql work on postgresql Selina Tech <swucareer99@gmail.com>
2016-03-29 23:16 ` Adrian Klaver <adrian.klaver@aklaver.com>
2016-03-29 23:19 ` David G. Johnston <david.g.johnston@gmail.com>
2016-03-30 15:23   ` Michael Moore <michaeljmoore@gmail.com>
2016-03-30 15:37     ` Thomas Kellerer <spam_eater@gmx.net>
2016-03-30 17:13       ` Michael Moore <michaeljmoore@gmail.com>
2016-03-30 17:56         ` Selina Tech <swucareer99@gmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox