pltcl/plython fixes for spi_prepare types

Started by Andrew Dunstanover 19 years ago4 messagespatches
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

Here's a patch along the same lines as the fix for plperl committed
earlier today, that allows passing type aliases to spi_prepare as well
as types named in pg_type. It also removes the mention of the previous
limitation in the pltcl docs. Unlike the plperl and pltcl cases, I
didn't use the simpler form that Tom suggested for plpython, as that
code wants to get hold of the HeapTuple. If anyone wants to tidy that up
some, feel free. Also, some regression tests from those with more tcl-fu
or python-fu that I have would be nice.

I'll apply this in a day or two unless there's an objection.

cheers

andrew

Attachments:

plfix.patchtext/x-patch; name=plfix.patchDownload+43-39
#2Bruce Momjian
bruce@momjian.us
In reply to: Andrew Dunstan (#1)
Re: [pgsql-patches] pltcl/plython fixes for spi_prepare types

Uh, I haven't seen this applied yet.

---------------------------------------------------------------------------

Andrew Dunstan wrote:

Here's a patch along the same lines as the fix for plperl committed
earlier today, that allows passing type aliases to spi_prepare as well
as types named in pg_type. It also removes the mention of the previous
limitation in the pltcl docs. Unlike the plperl and pltcl cases, I
didn't use the simpler form that Tom suggested for plpython, as that
code wants to get hold of the HeapTuple. If anyone wants to tidy that up
some, feel free. Also, some regression tests from those with more tcl-fu
or python-fu that I have would be nice.

I'll apply this in a day or two unless there's an objection.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#2)
Re: [pgsql-patches] pltcl/plython fixes for spi_prepare types

Oops.! That one got away. I'll work on it tonight.

cheers

andrew

Bruce Momjian wrote:

Show quoted text

Uh, I haven't seen this applied yet.

---------------------------------------------------------------------------

Andrew Dunstan wrote:

Here's a patch along the same lines as the fix for plperl committed
earlier today, that allows passing type aliases to spi_prepare as well
as types named in pg_type. It also removes the mention of the previous
limitation in the pltcl docs. Unlike the plperl and pltcl cases, I
didn't use the simpler form that Tom suggested for plpython, as that
code wants to get hold of the HeapTuple. If anyone wants to tidy that up
some, feel free. Also, some regression tests from those with more tcl-fu
or python-fu that I have would be nice.

I'll apply this in a day or two unless there's an objection.

#4Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#2)
Re: [pgsql-patches] pltcl/plython fixes for spi_prepare types

now applied.

cheers

andrew

Bruce Momjian wrote:

Show quoted text

Uh, I haven't seen this applied yet.

---------------------------------------------------------------------------

Andrew Dunstan wrote:

Here's a patch along the same lines as the fix for plperl committed
earlier today, that allows passing type aliases to spi_prepare as well
as types named in pg_type. It also removes the mention of the previous
limitation in the pltcl docs. Unlike the plperl and pltcl cases, I
didn't use the simpler form that Tom suggested for plpython, as that
code wants to get hold of the HeapTuple. If anyone wants to tidy that up
some, feel free. Also, some regression tests from those with more tcl-fu
or python-fu that I have would be nice.