> What if relabeling support were to spread some more?

The only example I can think of besides XML is JSON.  There might be a
few more.  Basically, relabelling is a handy shortcut when you are
serializing data and want to avoid specifying a list of columns and an
(almost) identical list of labels.  Otherwise, it's not good for much.
 I think we should eventually aim to support user-defined functions
that work like this, because people will forever be inventing new ways
to serialize things and it'd be nice not to have to recompile to add
support for a new one.

I suppose you might want to do something like this:

html_input(foo) returns <input name='foo' type='text' value='[...value
of foo...]'>
html_input(foo AS bar) returns <input name='foo' type='text'
value='[...value of foo...]'>
html_input(foo, type: hidden) returns <input name='foo' type='hidden'
value='[...value of foo...]'>

...Robert

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

Reply via email to