[SQL] strange result for select * from table where id=random()*900

2007-07-27 Thread Stefan Zweig
hi list, this is my query: select * from _g2977 where id=floor(random() * (900)); in table _g2977 i have id(s) from 1 up to 900. i just want to select one random dataset by the above query but i does not work. actually i get sometime zero, sometimes one, sometimes two and sometimes even th

[SQL] show index from [table]

2007-06-08 Thread Stefan Zweig
hi list, currently i am switching from mysql to pgsql, so i am a bit new to postgres' syntax. at the moment i am looking in postgres for something which is similar to SHOW INDEX FROM [table] in mysql. unfortunately i could not find anything satisfying relating to this issue. i have found out