urgent: problems with query_limit

Started by Herbert Liechtialmost 27 years ago5 messagesgeneral
Jump to latest
#1Herbert Liechti
Herbert.Liechti@thinx.ch

Hi

We upgraded our system from 6.4 to the new 6.5 version. The set query_limit function is not working
anymore in 6.5.

db => set query_limit to '100';
SET VARIABLE
db => select * from table;

statement is returning all records from the table. What's wrong here?

Herbie

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Herbert Liechti E-Mail: Herbert.Liechti@thinx.ch
ThinX networked business services Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#2Mike Haberman
mikeh@ncsa.uiuc.edu
In reply to: Herbert Liechti (#1)
help with SPI_<commands> Please

Hello experts.

I am writing my first function using the SPI_ interface.

I don't know how to access data that I just selected.

here's the outline:

my question is in the block comments

thanks a ton!!!!

mike

int32 allocate_address(int32 networkID)
{
char[255] query;

if (SPI_connect() < 0) {
return 0;
}

sprintf(query,
"Select addressID FROM networkaddress WHERE networkid = %i",
networkID);

if (SPI_exec(query, 1) < 0) {
return 0;
}

/* ############################################################ */
/* how do I access the data that I just selected ? */
/* ie I want to find the value of the each row in the select
/* ############################################################ */

SPI_finish();

return 1;
}
~

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Herbert Liechti (#1)
Re: [GENERAL] urgent: problems with query_limit

On Wed, 30 Jun 1999, Herbert Liechti wrote:

We upgraded our system from 6.4 to the new 6.5 version. The set query_limit function is not working
anymore in 6.5.

db => set query_limit to '100';
SET VARIABLE
db => select * from table;

statement is returning all records from the table. What's wrong here?

Whereas I'm not sure right now about what's wrong there, you should check
the new documentation of the SELECT command for the LIMIT specifier, as in
select * from table limit 100;
That might help.

--
Peter Eisentraut
PathWay Computing

#4Jackson, DeJuan
djackson@cpsgroup.com
In reply to: Peter Eisentraut (#3)
RE: [GENERAL] urgent: problems with query_limit

Try: select * from table LIMIT 100;

Show quoted text

Hi

We upgraded our system from 6.4 to the new 6.5 version. The set
query_limit function is not working
anymore in 6.5.

db => set query_limit to '100';
SET VARIABLE
db => select * from table;

statement is returning all records from the table. What's wrong here?

Herbie

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
Herbert Liechti E-Mail:
Herbert.Liechti@thinx.ch
ThinX networked business services Stahlrain 10, CH-5200
Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~

#5Bruce Momjian
bruce@momjian.us
In reply to: Herbert Liechti (#1)
Re: [GENERAL] urgent: problems with query_limit

Hi

We upgraded our system from 6.4 to the new 6.5 version. The set query_limit function is not working
anymore in 6.5.

db => set query_limit to '100';
SET VARIABLE
db => select * from table;

statement is returning all records from the table. What's wrong here?

Use the new LIMIT syntax on a SELECT query. It will be removed in the
upcoming 6.5.1.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026