chester c young wrote:
in php (for example) it's frequently nice to get the structure of a
table without any data, ie, pull a single row with each attribute's
value is null. I use the query (dual is a table of one row ala
Oracle):
select m.* from dual
left join mytable m on( false );
Out of curiosity, why do it this way? Does "rownum" not get set if there
are no rows returned?
Actually, even if it doesn't why not use:
SELECT * FROM mytable WHERE true=false
Surely your client interface returns the types/column-names then? It
should - that's a set of 0 rows.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org