Re: Insert more than one t-uple in a single sql - Mailing list pgsql-general

From Chris
Subject Re: Insert more than one t-uple in a single sql
Date
Msg-id 43EFCB5A.4060009@gmail.com
Whole thread Raw
In response to Re: Insert more than one t-uple in a single sql  ("Silas Justiniano" <silasju@gmail.com>)
List pgsql-general
What happens if that query returns 5,000 rows?

Postgres does actually have to fetch all of those rows, and then php has
to allocate memory etc to store them.

It's not very efficient.

Silas Justiniano wrote:
> Thank you very much. But what do you think of:
>
> select foobar from table where <condition>;
> if (pgsql_num_rows($result) > 15) show_pages;
> show_only_15($result);


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why does an ON SELECT rule have to be named "_RETURN"?
Next
From: "Ken Winter"
Date:
Subject: Re: Why does an ON SELECT rule have to be named "_RETURN"?