Pike v8.1 release 6

Method Sql.postgres()->list_fields()


Method list_fields

array(mapping(string:mixed)) list_fields(string table, void|string wild)

Description

Returns a mapping, indexed on the column name, of mappings describing the attributes of a table of the current database. If a glob is specified, will return descriptions only of the columns matching it.

The currently defined fields are:

"has_rules" : int 
"is_shared" : int 
"owner" : string

The textual representation of a Postgres uid.

"length" : string 
"text" : string

A textual description of the internal (to the server) type-name

"default" : mixed 
"expires" : string

The "relexpires" attribute for the table. Obsolescent; modern versions of Postgres don't seem to use this feature, so don't count on this field to contain any useful value.