Re: [DOCS] 4.2.9. Type Casts - documentation improvement - Mailing list pgsql-docs

From Steve Atkins
Subject Re: [DOCS] 4.2.9. Type Casts - documentation improvement
Date
Msg-id 96018C79-ABA3-41EB-A327-4F509D224A2A@blighty.com
Whole thread Raw
In response to Re: [DOCS] 4.2.9. Type Casts - documentation improvement  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [DOCS] 4.2.9. Type Casts - documentation improvement
List pgsql-docs
> On Sep 12, 2017, at 3:33 PM, Bruce Momjian <bruce@momjian.us> wrote:
>
> On Tue, Sep  5, 2017 at 02:17:12AM +0000, artejera@gmail.com wrote:
>> The following documentation comment has been logged on the website:
>>
>> Page: https://www.postgresql.org/docs/9.2/static/sql-syntax.html
>> Description:
>>
>> Hi,
>>
>> There seems to be no explicit documentation of the useful construct:
>>
>> Select tt.*::text from tt
>>
>> Also related:  4.2.13. Row Constructors
>>
>> Congrats for your project. Yours AT
>
> Woh, I was not aware that worked, e.g.:
>
>     test=> SELECT pg_language.*::text FROM pg_language;
>                  pg_language
>     -------------------------------------
>      (internal,10,f,f,0,0,2246,)
>      (c,10,f,f,0,0,2247,)
>      (sql,10,f,t,0,0,2248,)
>      (plpgsql,10,t,t,12319,12320,12321,)
>
> Any idea where this should be documented.   It is useful?

It's the output format of a composite type, isn't it?

steve=# select pg_language from pg_language;            pg_language

-------------------------------------(internal,10,f,f,0,0,2246,)(c,10,f,f,0,0,2247,)(sql,10,f,t,0,0,2248,)(plpgsql,10,t,t,12656,12657,12658,)
(4 rows)

https://www.postgresql.org/docs/current/static/rowtypes.html might be the place to expand on it, if so. (And converting
tohstore or json or csv are other useful things to discuss too, maybe). 

Cheers, Steve

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

pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [DOCS] 4.2.9. Type Casts - documentation improvement
Next
From: "David G. Johnston"
Date:
Subject: Re: [DOCS] 4.2.9. Type Casts - documentation improvement