On Nov 26, 2012, at 11:12 AM, Peter Eisentraut wrote:
> Although my intuition would be [], the existing concatenation-like
> aggregates return null for no input rows, so this probably ought to be
> consistent with those.
This annoys me at times, but I wrap such calls in COALESCE() and forget abo
On 11/27/2012 02:38 PM, Andrew Dunstan wrote:
On 11/26/2012 12:31 PM, Robert Haas wrote:
On Mon, Nov 26, 2012 at 11:43 AM, Andrew Dunstan
wrote:
I don't understand why you would want to create such a cast. If the
cast
doesn't exist it will do exactly what it does now, i.e. use the type's
ou
On 11/26/2012 12:31 PM, Robert Haas wrote:
On Mon, Nov 26, 2012 at 11:43 AM, Andrew Dunstan wrote:
I don't understand why you would want to create such a cast. If the cast
doesn't exist it will do exactly what it does now, i.e. use the type's
output function and then json quote and escape it,
On Mon, Nov 26, 2012 at 3:05 PM, Tom Lane wrote:
> The analogy to other aggregates is probably a better thing to argue
> from. On the other hand, I don't know anyone outside the SQL standards
> committee who thinks it's actually a good idea that SUM() across no rows
> returns null rather than zer
Hannu Krosing writes:
> On 11/26/2012 09:05 PM, Tom Lane wrote:
>> The analogy to other aggregates is probably a better thing to argue
>> from. On the other hand, I don't know anyone outside the SQL standards
>> committee who thinks it's actually a good idea that SUM() across no rows
>> returns n
On 11/26/2012 09:05 PM, Tom Lane wrote:
Hannu Krosing writes:
In some previous mail Tom Lane claimed that by SQL standard
either an array of all NULLs or a record with all fields NULLs (I
don't remember which) is also considered NULL. If this is true,
then an empty array - which can be said to
Hannu Krosing writes:
> In some previous mail Tom Lane claimed that by SQL standard
> either an array of all NULLs or a record with all fields NULLs (I
> don't remember which) is also considered NULL. If this is true,
> then an empty array - which can be said to consist of nothing
> but NULLs - sh
On 11/22/2012 11:54 AM, Dimitri Fontaine wrote:
Andrew Dunstan writes:
Here is a WIP patch for enhancements to json generation.
First, there is the much_requested json_agg, which will aggregate rows
directly to json. So the following will now work:
select json_agg(my_table) from mytable;
On 11/26/2012 02:46 PM, Hannu Krosing wrote:
On 11/26/2012 08:12 PM, Peter Eisentraut wrote:
On 11/21/12 3:16 PM, Andrew Dunstan wrote:
One open question regarding this feature is whether this should return
NULL or '[]' for 0 rows. Currently it returns NULL but I could be
convinced to return '
On 11/26/2012 08:12 PM, Peter Eisentraut wrote:
On 11/21/12 3:16 PM, Andrew Dunstan wrote:
One open question regarding this feature is whether this should return
NULL or '[]' for 0 rows. Currently it returns NULL but I could be
convinced to return '[]', and the change would be very small.
Altho
On 11/21/12 3:16 PM, Andrew Dunstan wrote:
> One open question regarding this feature is whether this should return
> NULL or '[]' for 0 rows. Currently it returns NULL but I could be
> convinced to return '[]', and the change would be very small.
Although my intuition would be [], the existing co
On Thu, Nov 22, 2012 at 4:54 AM, Dimitri Fontaine
wrote:
> Andrew Dunstan writes:
>> Here is a WIP patch for enhancements to json generation.
>>
>> First, there is the much_requested json_agg, which will aggregate rows
>> directly to json. So the following will now work:
>>
>> select json_agg
On Mon, Nov 26, 2012 at 11:43 AM, Andrew Dunstan wrote:
> I don't understand why you would want to create such a cast. If the cast
> doesn't exist it will do exactly what it does now, i.e. use the type's
> output function and then json quote and escape it, which in the case of
> citext is the Righ
On 11/26/2012 10:55 AM, Robert Haas wrote:
On Wed, Nov 21, 2012 at 3:16 PM, Andrew Dunstan wrote:
Non-builtin types are now searched for a cast to json, and if it exists it
is used instead of the type's text representation. I didn't add a special
type to look for a cast to, as was discussed be
On Wed, Nov 21, 2012 at 3:16 PM, Andrew Dunstan wrote:
> Non-builtin types are now searched for a cast to json, and if it exists it
> is used instead of the type's text representation. I didn't add a special
> type to look for a cast to, as was discussed before, as it seemed a bit
> funky and unne
On 11/22/2012 05:54 AM, Dimitri Fontaine wrote:
Andrew Dunstan writes:
Here is a WIP patch for enhancements to json generation.
First, there is the much_requested json_agg, which will aggregate rows
directly to json. So the following will now work:
select json_agg(my_table) from mytable
Andrew Dunstan writes:
> Here is a WIP patch for enhancements to json generation.
>
> First, there is the much_requested json_agg, which will aggregate rows
> directly to json. So the following will now work:
>
> select json_agg(my_table) from mytable;
> select json_agg(q) from () q;
Awes
On 11/21/2012 03:16 PM, Andrew Dunstan wrote:
Here is a WIP patch for enhancements to json generation.
First, there is the much_requested json_agg, which will aggregate rows
directly to json. So the following will now work:
select json_agg(my_table) from mytable;
select json_agg(q) f
Here is a WIP patch for enhancements to json generation.
First, there is the much_requested json_agg, which will aggregate rows
directly to json. So the following will now work:
select json_agg(my_table) from mytable;
select json_agg(q) from () q;
One open question regarding this feat
19 matches
Mail list logo