{"action":"created","issue":{"url":"https://api.github.com/repos/kjolley/BIGSdb/issues/328","repository_url":"https://api.github.com/repos/kjolley/BIGSdb","labels_url":"https://api.github.com/repos/kjolley/BIGSdb/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/kjolley/BIGSdb/issues/328/comments","events_url":"https://api.github.com/repos/kjolley/BIGSdb/issues/328/events","html_url":"https://github.com/kjolley/BIGSdb/issues/328","id":191069019,"number":328,"title":"Problem with autogenerated `SELECT` statement, too many columns","user":{"login":"horkko","id":9282917,"avatar_url":"https://avatars.githubusercontent.com/u/9282917?v=3","gravatar_id":"","url":"https://api.github.com/users/horkko","html_url":"https://github.com/horkko","followers_url":"https://api.github.com/users/horkko/followers","following_url":"https://api.github.com/users/horkko/following{/other_user}","gists_url":"https://api.github.com/users/horkko/gists{/gist_id}","starred_url":"https://api.github.com/users/horkko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horkko/subscriptions","organizations_url":"https://api.github.com/users/horkko/orgs","repos_url":"https://api.github.com/users/horkko/repos","events_url":"https://api.github.com/users/horkko/events{/privacy}","received_events_url":"https://api.github.com/users/horkko/received_events","type":"User","site_admin":false},"labels":[{"id":105077361,"url":"https://api.github.com/repos/kjolley/BIGSdb/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-11-22T17:14:28Z","updated_at":"2016-11-24T13:37:16Z","closed_at":null,"body":"Hi Keith,\r\n\r\nWe've faced a problem with BIGSdb when we try to define scheme members.\r\nOur users use the BIGSdb interface and the `BatchAdd` page to do it. \r\nBut, after a certain amount of time, here is the error thrown by the interface:\r\n```\r\nThe temp file containing the checked data does not exist.\r\n\r\nUpload cannot proceed. Make sure that you haven't used the back button and are attempting to re-upload already submitted data.\r\n```\r\nAnd we can see in BIGSdb log something like:\r\n```\r\nScheme.pm:147  - Check database attributes in the scheme_fields table for scheme#2 (Y.enterocolitica cgMLST)!\r\nDBD::Pg::st execute failed: ERROR:  target lists can have at most 1664 entries at /opt/bigsdb/lib/BIGSdb/Scheme.pm line 145.\r\n\r\n```\r\n\r\nWe can also see the automatic generated query from our PostgreSQL log:\r\n```\r\n...\r\nFROM mv_scheme_2 WHERE (profile[29]=$1 OR profile[29]='N') AND (profile[30]=$2 OR profile[30]='N') AND (profile[31]=$3 OR profile[31]='N')\r\nAND (profile[32]=$4 OR profile[32]='N') AND (profile[33]=$5 OR profile[33]='N') AND (profile[34]=$6 OR profile[34]='N') AND (profile[35]=$7 OR profile[35]='N') AND (profile[36]=$8 OR profile[36]='N')\r\n...\r\nAND (profile[1921]=$1921 OR profile[1921]='N');\r\n```\r\nIt looks like the query is too long and reach the PostgreSQL limit for a `columns number` (https://www.postgresql.org/about/)\r\n\r\nSo I think it should be good to add some checks in auto-generated queries to avoid such issues\r\n\r\nWhat do you think?\r\n\r\nEmmanuel"},"comment":{"url":"https://api.github.com/repos/kjolley/BIGSdb/issues/comments/262777986","html_url":"https://github.com/kjolley/BIGSdb/issues/328#issuecomment-262777986","issue_url":"https://api.github.com/repos/kjolley/BIGSdb/issues/328","id":262777986,"user":{"login":"kjolley","id":7817395,"avatar_url":"https://avatars.githubusercontent.com/u/7817395?v=3","gravatar_id":"","url":"https://api.github.com/users/kjolley","html_url":"https://github.com/kjolley","followers_url":"https://api.github.com/users/kjolley/followers","following_url":"https://api.github.com/users/kjolley/following{/other_user}","gists_url":"https://api.github.com/users/kjolley/gists{/gist_id}","starred_url":"https://api.github.com/users/kjolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjolley/subscriptions","organizations_url":"https://api.github.com/users/kjolley/orgs","repos_url":"https://api.github.com/users/kjolley/repos","events_url":"https://api.github.com/users/kjolley/events{/privacy}","received_events_url":"https://api.github.com/users/kjolley/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T13:37:16Z","updated_at":"2016-11-24T13:37:16Z","body":"Is this in the seqdef or isolate database?"}}
{"actor":{"display_login":"kjolley"}}