Added limit where it should stop creating a select

My browser would often crash when loading the list of options from a foreign table. With this patch a maximum of 50 is shown and otherwise no change is done to the view. The 50 can easily be changed to another number by changing the LIMIT constant.