Re: Column info without executing query
| От | Jacob Coby |
|---|---|
| Тема | Re: Column info without executing query |
| Дата | |
| Msg-id | 44C0DED5.7020902@listingbook.com обсуждение исходный текст |
| Ответ на | Re: Column info without executing query (Martijn van Oosterhout <kleptog@svana.org>) |
| Список | pgsql-general |
Martijn van Oosterhout wrote: > On Fri, Jul 21, 2006 at 04:14:52PM +0300, Volkan YAZICI wrote: >> On Jul 21 09:02, Jacob Coby wrote: >>> Volkan YAZICI wrote: >>>> As Tom mentioned, there's support for this feature in the protocol >>>> level, but I don't know any API supports this yet. However, here's a >>>> patch that adds Describe functionality for Prepared Statements and >>>> Cursors to libpq: >>>> http://archives.postgresql.org/pgsql-hackers/2006-06/msg01281.php >>> PHP supports it with the pg_field_type() function. >> PHP uses libpq in the background to communicate with the server. How >> can you wait PHP to support a feature that's not supported by libpq? >> Furtheremore, pg_field_type() queries system catalogs to collect >> information which is quite different than Describe functionality. > > Really, I would have thought the PHP function would map directly to the > libpq PQftype() function. Although libpq returns the OID whereas the > PHP function returns the type. But I don't think that's what the > original user asked for given you need a ResultSet first. It uses PQftype() to get the oid and then queries the pg_type table to map the oid to the typname.
В списке pgsql-general по дате отправления: