Re: Add support for SRF and returning composites to pl/tcl

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add support for SRF and returning composites to pl/tcl
Date: 2016-11-06 05:09:58
Message-ID: CAFj8pRBXDer-Ztpefnz+oYNPD9UCVg-XyteGTBQihM2TNRY3Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-11-06 2:12 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> writes:
> > Attached is a patch that adds support for SRFs and returning composites
> > from pl/tcl. This work was sponsored by Flight Aware.
>
> I spent a fair amount of time whacking this around, because I did not
> like the fact that you were using the pltcl_proc_desc structs for
> call-local data. That would fail nastily in a recursive function.
> I ended up making a new struct to represent per-call data, which
> allowed reducing the number of global pointers.
>
> I got the code to a state that I liked (attached), and started reviewing
> the docs, and then it occurred to me to wonder why you'd chosen to use
> Tcl lists to represent composite output values. The precedent established
> by input argument handling is that composites are transformed to Tcl
> arrays. So shouldn't we use an array to represent a composite result,
> too?
>

This can be similar to PLPythonu - one dimensional array is possible to
transform to composite - when composite is expected.

Regards

Pavel

>
> I wouldn't necessarily object to allowing either representation, though
> I'm not sure how we'd distinguish between them.
>
> regards, tom lane
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-11-06 08:33:15 Re: commitfest 2016-11 status summary
Previous Message Tom Lane 2016-11-06 01:12:20 Re: Add support for SRF and returning composites to pl/tcl