type of a field

Поиск
Список
Период
Сортировка
Искать

type of a field

От:
ameen eetemadi <ameen78101@yahoo.com>
Дата:
Hello
I want to know the type of a field in a table
how can I khow it ?

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

Re: type of a field

От:
Keary Suska <hierophant@pcisys.net>
Дата:
on 5/2/02 3:48 AM, ameen78101@yahoo.com purportedly said:

> Hello
> I want to know the type of a field in a table
> how can I khow it ?

There are different ways. You can use pg_field_type(), or a Postgres
function. It's all in the docs. RTFM.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

Re: type of a field

От:
"Josh Berkus" <josh@agliodbs.com>
Дата:
Ameen,

> I want to know the type of a field in a table
> how can I khow it ?

Way #1:
1. Log into to your database using the command line utility PSQL.
2. Type "\d "

Way #2:
1. Install phpPgAdmin database administration tool.
2. Examine the table using phpPgAdmin.

-Josh

Re: type of a field

От:
knut.suebert@web.de
Дата:
ameen eetemadi schrieb:

> I want to know the type of a field in a table how can I khow it ?

  pg_fieldtype()

or something like

  SELECT a.attname, format_type(a.atttypid, a.atttypmod)
	 FROM pg_class c, pg_attribute a
	 WHERE c.relname = '$tablename'
	 AND a.attnum > 0 AND a.attrelid = c.oid
	 ORDER BY a.attnum;

?

Bye,
Knut Sübert

Re: type of a field

От:
"Duncan Adams (DNS)" <duncan.adams@vcontractor.co.za>
Дата:
Would pg_fieldname() and pg_fieldtype() also be an option?

-----Original Message-----
From: Josh Berkus [mailto:josh@agliodbs.com]
Sent: Thursday, May 02, 2002 6:49 PM
To: ameen eetemadi; pgsql-php@postgresql.org
Subject: Re: [PHP] type of a field


Ameen,

> I want to know the type of a field in a table
> how can I khow it ?

Way #1:
1. Log into to your database using the command line utility PSQL.
2. Type "\d "

Way #2:
1. Install phpPgAdmin database administration tool.
2. Examine the table using phpPgAdmin.

-Josh

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
FAQ