how to get the field types of a(n empty) table?

From: knut(dot)suebert(at)web(dot)de
To: pgsql-php(at)postgresql(dot)org
Subject: how to get the field types of a(n empty) table?
Date: 2001-10-20 17:59:03
Message-ID: 20011020195903.A8147@cascal.vtb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hello,

is there a possibility to get the field types of an empty table?

I made a class for editing tables in a html form. The data is inserted
or updated by something like

"update $table set $row='$DATA'::$ftype[$row] where oid=$oid"

The type of the fields is gotten by a "select $rows from $table limit
1" -- but this is only possible, if there is at least one row inside a
table (for an "insert", "update" is no problem, of course).

It should be possible by reading something out of the postgres' system
tables, but I didn't found it.

Thank in advance,
Knut Sübert

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Papp Gyozo 2001-10-22 15:59:03 Re: how to get the field types of a(n empty) table?
Previous Message Dan Wilson 2001-10-19 14:14:59 phpPgAdmin joins SourceForge