Re: pgsql functions: get column headers; optional arguments

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Mark *EXTERN*" <mark(at)manngo(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgsql functions: get column headers; optional arguments
Date: 2007-08-27 07:44:27
Message-ID: D960CB61B694CF459DCFB4B0128514C2220778@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark wrote:
> I am writing a function to extract data either from a table or a query

> and output it in xml. I have the logic down, but I cannot work out a
few
> things.
>
> 1. How can I read the column headings from the returned data set? I
have
> resorted to writing the same function in tcl in which I can work out
how
> to do this, but what about pgsql? I can't use the system tables for
> this, since the data may not come from a table.

I don't think there is a way.

> 2. It it possible, either in tcl or pgsql, to have optional function
> arguments?

No.

Before you do a lot of work on this, check out the xml2 contrib module.
It may provide a lot of what you need.

There will also be XML stuff in 8.3 core.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kristo Kaiv 2007-08-27 07:52:38 Re: [GENERAL] table column vs. out param [1:0]
Previous Message Albe Laurenz 2007-08-27 07:29:21 Re: LDAP service lookup