Обсуждение: pgsql: Add utility functions to PLPerl: quote_literal,

Поиск
Список
Период
Сортировка

pgsql: Add utility functions to PLPerl: quote_literal,

От
adunstan@postgresql.org (Andrew Dunstan)
Дата:
Log Message:
-----------
Add utility functions to PLPerl:
    quote_literal, quote_nullable, quote_ident,
    encode_bytea, decode_bytea, looks_like_number,
    encode_array_literal, encode_array_constructor.
Split SPI.xs into two - SPI.xs now contains only SPI functions. Remainder
are in new Util.xs.
Some more code and documentation cleanup along the way, as well as
adding some CVS markers to files missing them.

Original patch from Tim Bunce, with a little editing from me.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        plperl.sgml (r2.72 -> r2.73)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/plperl.sgml?r1=2.72&r2=2.73)
    pgsql/src/pl/plperl:
        GNUmakefile (r1.41 -> r1.42)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/GNUmakefile?r1=1.41&r2=1.42)
        SPI.xs (r1.20 -> r1.21)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/SPI.xs?r1=1.20&r2=1.21)
        plc_perlboot.pl (r1.1 -> r1.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_perlboot.pl?r1=1.1&r2=1.2)
        plc_safe_bad.pl (r1.1 -> r1.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_safe_bad.pl?r1=1.1&r2=1.2)
        plc_safe_ok.pl (r1.1 -> r1.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plc_safe_ok.pl?r1=1.1&r2=1.2)
        plperl.c (r1.159 -> r1.160)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.c?r1=1.159&r2=1.160)
        plperl.h (r1.10 -> r1.11)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.h?r1=1.10&r2=1.11)
        text2macro.pl (r1.1 -> r1.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/text2macro.pl?r1=1.1&r2=1.2)
    pgsql/src/pl/plperl/expected:
        plperl_elog.out (r1.7 -> r1.8)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/expected/plperl_elog.out?r1=1.7&r2=1.8)

Added Files:
-----------
    pgsql/src/pl/plperl:
        Util.xs (r1.1)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/Util.xs?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/pl/plperl/expected:
        plperl_util.out (r1.1)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/expected/plperl_util.out?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/pl/plperl/sql:
        plperl_util.sql (r1.1)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/sql/plperl_util.sql?rev=1.1&content-type=text/x-cvsweb-markup)

Removed Files:
-------------
    pgsql/src/pl/plperl:
        spi_internal.c
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/spi_internal.c)

Re: pgsql: Add utility functions to PLPerl: quote_literal,

От
Tom Lane
Дата:
adunstan@postgresql.org (Andrew Dunstan) writes:
> Add utility functions to PLPerl:

mastodon doesn't like this patch.  I'm suspecting the GNUmakefile
changes need to be reflected into the MSVC scripts.

            regards, tom lane

Re: pgsql: Add utility functions to PLPerl: quote_literal,

От
Robert Haas
Дата:
On Tue, Jan 19, 2010 at 8:08 PM, Andrew Dunstan <adunstan@postgresql.org> wrote:
> Log Message:
> -----------
> Add utility functions to PLPerl:
>    quote_literal, quote_nullable, quote_ident,
>    encode_bytea, decode_bytea, looks_like_number,
>    encode_array_literal, encode_array_constructor.
> Split SPI.xs into two - SPI.xs now contains only SPI functions. Remainder
> are in new Util.xs.
> Some more code and documentation cleanup along the way, as well as
> adding some CVS markers to files missing them.
>
> Original patch from Tim Bunce, with a little editing from me.

This patch contains a large number of unnecessary whitespace changes.

It also broke the doc build.  I have applied a quick fix which looks
reasonable so that I can continue working, but it might merit a second
look.

...Robert

Re: pgsql: Add utility functions to PLPerl: quote_literal,

От
Andrew Dunstan
Дата:

Tom Lane wrote:
> adunstan@postgresql.org (Andrew Dunstan) writes:
>
>> Add utility functions to PLPerl:
>>
>
> mastodon doesn't like this patch.  I'm suspecting the GNUmakefile
> changes need to be reflected into the MSVC scripts.
>
>
>

Oh, darnit, of course. Will fix.

cheers

andrew

Re: pgsql: Add utility functions to PLPerl: quote_literal,

От
Andrew Dunstan
Дата:

Robert Haas wrote:
> This patch contains a large number of unnecessary whitespace changes.
>
> It also broke the doc build.  I have applied a quick fix which looks
> reasonable so that I can continue working, but it might merit a second
> look.
>


Thanks for the fix. Are you just referring to whitespace changes in the
docs, or elsewhere? Tim mentioned in his patch submission that he had
removed some unnecessary trailing white space in the docs. Maybe that's
what you're referring to.

cheers

andrew


Re: pgsql: Add utility functions to PLPerl: quote_literal,

От
Robert Haas
Дата:
On Tue, Jan 19, 2010 at 11:09 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> This patch contains a large number of unnecessary whitespace changes.
>>
>> It also broke the doc build.  I have applied a quick fix which looks
>> reasonable so that I can continue working, but it might merit a second
>> look.
>
> Thanks for the fix. Are you just referring to whitespace changes in the
> docs, or elsewhere? Tim mentioned in his patch submission that he had
> removed some unnecessary trailing white space in the docs. Maybe that's what
> you're referring to.

Yeah, that's it.  Perhaps I was premature to complain about that part
of it - I am not a fan of trailing whitespace.

...Robert

Re: pgsql: Add utility functions to PLPerl: quote_literal,

От
Tom Lane
Дата:
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Jan 19, 2010 at 11:09 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> Thanks for the fix. Are you just referring to whitespace changes in the
>> docs, or elsewhere? Tim mentioned in his patch submission that he had
>> removed some unnecessary trailing white space in the docs. Maybe that's what
>> you're referring to.

> Yeah, that's it.  Perhaps I was premature to complain about that part
> of it - I am not a fan of trailing whitespace.

There is a great deal of trailing whitespace in the SGML files --- I
suspect that some people use editing tools that tend to generate such
stuff.  Maybe we could try to get rid of it at some quiet time, like
when we run pgindent.  Personally I try to remove any that's in a
section I have reason to change, but it seems better not to touch
unrelated parts of the file ...

            regards, tom lane