pgsql functions: get column headers; optional arguments

From: Mark <mark(at)manngo(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: pgsql functions: get column headers; optional arguments
Date: 2007-08-24 08:35:01
Message-ID: 46CE9835.7060104@manngo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi. I hope this is the correct mailing list.<br>
<br>
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.<br>
<br>
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.<br>
<br>
2. It it possible, either in tcl or pgsql, to have optional function
arguments?<br>
<br>
Thanks,<br>
<br>
Mark<br>
</tt>
<div class="moz-signature">-- <br>
<style>
#signature {
color: #00008B;
font-family: sans-serif;
font-size: 10pt;
}
#signature h1 {
font-size: 125%;
margin: 4px 0px;
}
#signature p {
margin: 4px 0px;
}
#signature a {
color: #005247;
text-decoration: none;
}
</style>
<div id="signature">
<h1>Mark Simon</h1>
<p>Manngo Net Pty Ltd</p>
<p>Phone/Fax: 1300 726 000<br>
mobile: 0411 246 672</p>
<p>email: <a href="mailto:mark(at)comparity(dot)net">mark(at)manngo(dot)net</a><br>
web: <a href="http://www.manngo.net">http://www.manngo.net</a></p>
<p>Resume: <a href="http://mark.manngo.net">http://mark.manngo.net</a></p>
</div>
</div>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2007-08-24 08:40:15 Re: PostgreSQL vs Firebird feature comparison finished
Previous Message Richard Huxton 2007-08-24 08:28:23 Re: Local authentication/security