Re: How to assemble all fields of (any) view into a string?

Поиск
Список
Период
Сортировка
От Ken Tanzer
Тема Re: How to assemble all fields of (any) view into a string?
Дата
Msg-id CAD3a31Um9h7C3dcwVpNTz+43-kPD-pmMSDXhEycdWMb2sFi1Bw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to assemble all fields of (any) view into a string?  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general


On Wed, Sep 7, 2016 at 4:31 PM, John R Pierce <pierce@hogranch.com> wrote:
On 9/7/2016 1:36 PM, Ken Tanzer wrote:
No transformation is needed, except for padding the fields out to their maximum lengths.

without accessing metadata, how would you know what those maximum lengths are??

I agree you'd need metadata.  My OP mentioned looking this up in the information schema
 

and how would the calling program even know what the fields are if its not aware of the field lengths?

Do you mean how would the function know?  I didn't see a better way than by explicitly passing the view name.

 
what if a field is type 'text' ? or an array type ?


They won't be.  This has to work for a very specific set of views I've created, not for any view in the universe!

Cheers,
Ken
 

--
john r pierce, recycling bits in santa cruz



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



--
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

В списке pgsql-general по дате отправления:

Предыдущее
От: Ken Tanzer
Дата:
Сообщение: Re: How to assemble all fields of (any) view into a string?
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2