Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
Postgres
Postgres.postgres

Method Postgres.postgres()->big_query()


Method big_query

Sql.postgres_result big_query(string sqlquery)

Description

This is the only provided interface which allows you to query the database. If you wish to use the simpler "query" function, you need to use the Sql.Sql generic sql-object.

It returns a postgres_result object (which conforms to the Sql.sql_result standard interface for accessing data). I recommend using query() for simpler queries (because it is easier to handle, but stores all the result in memory), and big_query for queries you expect to return huge amounts of data (it's harder to handle, but fectches results on demand).

Note

This function can raise exceptions.

The program Sql.postgres_result is exactly the same as Postgres.postgres_result .

See also

Sql.Sql , Sql.sql_result