Re: How to alias attributes in an ARRAY_AGG expression

From: Claudio Poli <masterkain(at)gmail(dot)com>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: How to alias attributes in an ARRAY_AGG expression
Date: 2013-11-13 17:51:57
Message-ID: CANp6Qo+MJAgOtgGn-Yqi2u1CVmzoPLw4V_re27-5ksVvzYBiHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Awesome, thank you very much.
C.

On Wed, Nov 13, 2013 at 6:39 PM, David Johnston <polobo(at)yahoo(dot)com> wrote:

> Claudio Poli wrote
> > create type media_file_detail as (position integer AS myalias);
>
> CREATE TYPE media_file_detail AS (position_alias integer, token_alias
> text);
>
> ... ARRAY_AGG(
> (media_files.position, media_files.token)::media_file_detail
> ) ...
>
> David J.
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/How-to-alias-attributes-in-an-ARRAY-AGG-expression-tp5778089p5778196.html
> Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Claudio Poli 2013-11-14 07:38:20 manipulate and return row inside a function
Previous Message David Johnston 2013-11-13 17:39:32 Re: How to alias attributes in an ARRAY_AGG expression