pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make plpython cope with funny characters in function names.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Make plpython cope with funny characters in function names.
@ 2016-02-17 02:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2016-02-17 02:08 UTC (permalink / raw)
  To: pgsql-committers

Make plpython cope with funny characters in function names.

A function name that's double-quoted in SQL can contain almost any
characters, but we were using that name directly as part of the name
generated for the Python-level function, and Python doesn't like
anything that isn't pretty much a standard identifier.  To fix,
replace anything that isn't an ASCII letter or digit with an underscore
in the generated name.  This doesn't create any risk of duplicate Python
function names because we were already appending the function OID to
the generated name to ensure uniqueness.  Per bug #13960 from Jim Nasby.

Patch by Jim Nasby, modified a bit by me.  Back-patch to all
supported branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/66f503868b2ac1163aaf48a2f76d8be02af0bc81

Modified Files
--------------
src/pl/plpython/expected/plpython_test.out |  8 ++++----
src/pl/plpython/plpy_procedure.c           | 10 ++++++++++
src/pl/plpython/sql/plpython_test.sql      |  6 +++---
3 files changed, 17 insertions(+), 7 deletions(-)


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


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

* pgsql: Make plpython cope with funny characters in function names.
@ 2016-02-17 02:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2016-02-17 02:08 UTC (permalink / raw)
  To: pgsql-committers

Make plpython cope with funny characters in function names.

A function name that's double-quoted in SQL can contain almost any
characters, but we were using that name directly as part of the name
generated for the Python-level function, and Python doesn't like
anything that isn't pretty much a standard identifier.  To fix,
replace anything that isn't an ASCII letter or digit with an underscore
in the generated name.  This doesn't create any risk of duplicate Python
function names because we were already appending the function OID to
the generated name to ensure uniqueness.  Per bug #13960 from Jim Nasby.

Patch by Jim Nasby, modified a bit by me.  Back-patch to all
supported branches.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2ce19f8a57f5f5eba3d86dc8457d2e992df5af8f

Modified Files
--------------
src/pl/plpython/expected/plpython_test.out |  8 ++++----
src/pl/plpython/plpy_procedure.c           | 10 ++++++++++
src/pl/plpython/sql/plpython_test.sql      |  6 +++---
3 files changed, 17 insertions(+), 7 deletions(-)


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


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

* pgsql: Make plpython cope with funny characters in function names.
@ 2016-02-17 02:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2016-02-17 02:08 UTC (permalink / raw)
  To: pgsql-committers

Make plpython cope with funny characters in function names.

A function name that's double-quoted in SQL can contain almost any
characters, but we were using that name directly as part of the name
generated for the Python-level function, and Python doesn't like
anything that isn't pretty much a standard identifier.  To fix,
replace anything that isn't an ASCII letter or digit with an underscore
in the generated name.  This doesn't create any risk of duplicate Python
function names because we were already appending the function OID to
the generated name to ensure uniqueness.  Per bug #13960 from Jim Nasby.

Patch by Jim Nasby, modified a bit by me.  Back-patch to all
supported branches.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f461fa7d07389e09dcc46d994cac02e52ce89e6b

Modified Files
--------------
src/pl/plpython/expected/plpython_test.out |  8 ++++----
src/pl/plpython/plpy_procedure.c           | 10 ++++++++++
src/pl/plpython/sql/plpython_test.sql      |  6 +++---
3 files changed, 17 insertions(+), 7 deletions(-)


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


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

* pgsql: Make plpython cope with funny characters in function names.
@ 2016-02-17 02:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2016-02-17 02:08 UTC (permalink / raw)
  To: pgsql-committers

Make plpython cope with funny characters in function names.

A function name that's double-quoted in SQL can contain almost any
characters, but we were using that name directly as part of the name
generated for the Python-level function, and Python doesn't like
anything that isn't pretty much a standard identifier.  To fix,
replace anything that isn't an ASCII letter or digit with an underscore
in the generated name.  This doesn't create any risk of duplicate Python
function names because we were already appending the function OID to
the generated name to ensure uniqueness.  Per bug #13960 from Jim Nasby.

Patch by Jim Nasby, modified a bit by me.  Back-patch to all
supported branches.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/b3ec98c8bdb2ceb6c0fe0cd15a6299bcd42cb1d3

Modified Files
--------------
src/pl/plpython/expected/plpython_test.out |  8 ++++----
src/pl/plpython/plpy_procedure.c           | 10 ++++++++++
src/pl/plpython/sql/plpython_test.sql      |  6 +++---
3 files changed, 17 insertions(+), 7 deletions(-)


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


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

* pgsql: Make plpython cope with funny characters in function names.
@ 2016-02-17 02:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2016-02-17 02:08 UTC (permalink / raw)
  To: pgsql-committers

Make plpython cope with funny characters in function names.

A function name that's double-quoted in SQL can contain almost any
characters, but we were using that name directly as part of the name
generated for the Python-level function, and Python doesn't like
anything that isn't pretty much a standard identifier.  To fix,
replace anything that isn't an ASCII letter or digit with an underscore
in the generated name.  This doesn't create any risk of duplicate Python
function names because we were already appending the function OID to
the generated name to ensure uniqueness.  Per bug #13960 from Jim Nasby.

Patch by Jim Nasby, modified a bit by me.  Back-patch to all
supported branches.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7d48349fd9cb3c64d53bdecac933f2c44c703f22

Modified Files
--------------
src/pl/plpython/expected/plpython_test.out |  8 ++++----
src/pl/plpython/plpy_procedure.c           | 10 ++++++++++
src/pl/plpython/sql/plpython_test.sql      |  6 +++---
3 files changed, 17 insertions(+), 7 deletions(-)


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


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

* pgsql: Make plpython cope with funny characters in function names.
@ 2016-02-17 02:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2016-02-17 02:08 UTC (permalink / raw)
  To: pgsql-committers

Make plpython cope with funny characters in function names.

A function name that's double-quoted in SQL can contain almost any
characters, but we were using that name directly as part of the name
generated for the Python-level function, and Python doesn't like
anything that isn't pretty much a standard identifier.  To fix,
replace anything that isn't an ASCII letter or digit with an underscore
in the generated name.  This doesn't create any risk of duplicate Python
function names because we were already appending the function OID to
the generated name to ensure uniqueness.  Per bug #13960 from Jim Nasby.

Patch by Jim Nasby, modified a bit by me.  Back-patch to all
supported branches.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/875973f5d756a56ea3589c059fc83664e2bb010e

Modified Files
--------------
src/pl/plpython/expected/plpython_test.out |  8 ++++----
src/pl/plpython/plpython.c                 | 10 ++++++++++
src/pl/plpython/sql/plpython_test.sql      |  6 +++---
3 files changed, 17 insertions(+), 7 deletions(-)


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


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


end of thread, other threads:[~2016-02-17 02:08 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 02:08 pgsql: Make plpython cope with funny characters in function names. Tom Lane <tgl@sss.pgh.pa.us>
2016-02-17 02:08 pgsql: Make plpython cope with funny characters in function names. Tom Lane <tgl@sss.pgh.pa.us>
2016-02-17 02:08 pgsql: Make plpython cope with funny characters in function names. Tom Lane <tgl@sss.pgh.pa.us>
2016-02-17 02:08 pgsql: Make plpython cope with funny characters in function names. Tom Lane <tgl@sss.pgh.pa.us>
2016-02-17 02:08 pgsql: Make plpython cope with funny characters in function names. Tom Lane <tgl@sss.pgh.pa.us>
2016-02-17 02:08 pgsql: Make plpython cope with funny characters in function names. Tom Lane <tgl@sss.pgh.pa.us>

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