RE: [GENERAL] urgent: problems with query_limit
От | Marcus Mascari |
---|---|
Тема | RE: [GENERAL] urgent: problems with query_limit |
Дата | |
Msg-id | 19990701001209.11670.rocketmail@web118.yahoomail.com обсуждение исходный текст |
Ответы |
Re: [HACKERS] RE: [GENERAL] urgent: problems with query_limit
|
Список | pgsql-hackers |
What I would like to see (perhaps its possible right now, or a workaround is available) is a method for yielding an elog() message when the number of tuples to be returned is over a specified USER limit. The thrust of this issue is that we are rolling out a PostgreSQL database which is driven by a Web environment for most users. However, some users will have ODBC access to some of the tables. One of these table has more than a million rows and is a totally denormalized "sales" table for all transactions performed. It is the main tables the various managers will be attacking with ODBC. However, what we would like to prevent is some new user, unfamiliar with how to design aggregate and restrive queries, from doing a SELECT * FROM sales and having 1 gig of data shipped across the network to their Excel, Access, or Crystal Report Writer application. Instead, we would like to generate an elog() error in the backend like: "You are allowed to return a maximum of 20,000 rows." or some such constraint, as a per-user attribute. We don't want to restrict the tuples which can participate in their queries, just the number of rows returned. So, SELECT SUM(price) FROM sales, would be okay. What we don't want is a query limit, which, when reached, silently returns the number of rows without the user knowing they didn't get all the data they requested. Any hints or tips to achieve this functionality? Marcus "Mike" Mascari (mascarim@yahoo.com) --- "Jackson, DeJuan" <djackson@cpsgroup.com> wrote: > Try: select * from table LIMIT 100; > > > 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 _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
В списке pgsql-hackers по дате отправления: