Search Postgresql Archives

Re: This is a limit-offset bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/12/26 Martijn van Oosterhout <kleptog@xxxxxxxxx>:
> On Fri, Dec 26, 2008 at 09:52:59AM -0200, Emanuel Calvo Franco wrote:
>> Hi people,
>>
>> Yesterday when i was making some commands on 8.3.5
>> (on Centos)
>> i found a rare behavior of limit offset.
>>
>> Try in psql:
>>
>> select * from foo limit 3; <- shows ok
>> select * from foo limit3; <- shows all rows
>> select * from foo offset1223raf3w4t4tgga; <- shows all rows
>> select * from foo limitsdfsdfaerfgsafqaweawe; <- shows all rows
>> select * from foo limit; <- this shows error ok
>> select * from foo limitt; ....
>
> At a wild gues, if the string after the table name is a single token it
> gets interpreted as an alias for the table. Remember that AS is
> optional.
>

Yes, you're right.
i look at:

create table foo (i serial); (...inserts by default)
select limit111.i from foo limit111; <- this returns all rows on i

Is not a limit question, is about table alias. D'oh!

Sorry...
> Have a nice day,
> --
> Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
>> Please line up in a tree and maintain the heap invariant while
>> boarding. Thank you for flying nlogn airlines.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFJVQpyIB7bNG8LQkwRAs9yAJ9Q03c2M9tXKzmaQpCtxBH3f9aquACgj7sr
> HJuIKqz1NLp8B8EqlOZkym8=
> =Qox3
> -----END PGP SIGNATURE-----
>
>



-- 
      Emanuel Calvo Franco
Syscope Postgresql Consultant
     ArPUG / AOSUG Member

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux