Thread: Re: [SQL] pl/PgSQL, variable names in NEW

Re: [SQL] pl/PgSQL, variable names in NEW

From
Alvaro Herrera
Date:
Martin Edlman wrote:

> |> I don't want to rewrite whole trigger to plPerl as I would have to use
> |> DBD-PgSPI.
> |
> | Huh?  Certainly not -- there are functions in PL/Perl for this.  See
> | spi_exec_query in
> | http://www.postgresql.org/docs/8.3/static/plperl-database.html
>
> Oh, I see. I have read the doc "...can be done via the function
> spi_exec_query described below, or via an experimental module
> DBD::PgSPI...", but missed the "OR" and thought that DBD::PgSPI is
> mandatory.

Yeah, that's a bit confusing.  I don't know why we have a mention of
DBD::PgSPI on the plperl manual at all.  Is there anything it can do
that can't be done with PL/Perl native calls?

Question for plperl hackers:  Should we remove the mention of DBD::PgSPI
from the PL/Perl manual?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: [SQL] pl/PgSQL, variable names in NEW

From
Tom Lane
Date:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Question for plperl hackers:  Should we remove the mention of DBD::PgSPI
> from the PL/Perl manual?

It seems like a reasonable suggestion to me, since perl database users
probably already know DBD and don't have to learn something new if they
go that way.

Possibly the text should be reworded, with the mention of DBD::PgSPI put
somewhere else or stuck into a <note> or something.

            regards, tom lane

Re: [DOCS] [SQL] pl/PgSQL, variable names in NEW

From
"Joshua D. Drake"
Date:
On Thu, 10 Apr 2008 10:45:25 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Question for plperl hackers:  Should we remove the mention of
> > DBD::PgSPI from the PL/Perl manual?
>
> It seems like a reasonable suggestion to me, since perl database users
> probably already know DBD and don't have to learn something new if
> they go that way.
>
> Possibly the text should be reworded, with the mention of DBD::PgSPI
> put somewhere else or stuck into a <note> or something.

From what I can see on CPAN (unless I am missing something) DBD::PgSPI
hasn't been updated since 2004 and is at version 0.2.

http://www.cpan.org/modules/by-module/DBD/

I think it can safely be removed in entirety from our manuals.

Sincerely,

Joshua D. Drake


--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate



Re: [DOCS] [SQL] pl/PgSQL, variable names in NEW

From
Andrew Dunstan
Date:

Joshua D. Drake wrote:
> On Thu, 10 Apr 2008 10:45:25 -0400
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>
>> Alvaro Herrera <alvherre@commandprompt.com> writes:
>>
>>> Question for plperl hackers:  Should we remove the mention of
>>> DBD::PgSPI from the PL/Perl manual?
>>>
>> It seems like a reasonable suggestion to me, since perl database users
>> probably already know DBD and don't have to learn something new if
>> they go that way.
>>
>> Possibly the text should be reworded, with the mention of DBD::PgSPI
>> put somewhere else or stuck into a <note> or something.
>>
>
> From what I can see on CPAN (unless I am missing something) DBD::PgSPI
> hasn't been updated since 2004 and is at version 0.2.
>
> http://www.cpan.org/modules/by-module/DBD/
>
> I think it can safely be removed in entirety from our manuals.
>
>
>

+1. It's also GNU licensed, so we can't include it. A clean room BSD
licensed implementation would be a nice addition, but it really doesn't
buy you much in functionality that you don't already have.

cheers

andrew

Re: [DOCS] [SQL] pl/PgSQL, variable names in NEW

From
Tom Lane
Date:
"Joshua D. Drake" <jd@commandprompt.com> writes:
> From what I can see on CPAN (unless I am missing something) DBD::PgSPI
> hasn't been updated since 2004 and is at version 0.2.

Oh, if it's not a live project then that changes things entirely.
+1 for just dropping the mention.

            regards, tom lane

Re: [DOCS] [SQL] pl/PgSQL, variable names in NEW

From
Alvaro Herrera
Date:
Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
> > From what I can see on CPAN (unless I am missing something) DBD::PgSPI
> > hasn't been updated since 2004 and is at version 0.2.
>
> Oh, if it's not a live project then that changes things entirely.
> +1 for just dropping the mention.

Done.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support