{"action":"created","issue":{"url":"https://api.github.com/repos/linq2db/linq2db/issues/1394","repository_url":"https://api.github.com/repos/linq2db/linq2db","labels_url":"https://api.github.com/repos/linq2db/linq2db/issues/1394/labels{/name}","comments_url":"https://api.github.com/repos/linq2db/linq2db/issues/1394/comments","events_url":"https://api.github.com/repos/linq2db/linq2db/issues/1394/events","html_url":"https://github.com/linq2db/linq2db/issues/1394","id":379445475,"node_id":"MDU6SXNzdWUzNzk0NDU0NzU=","number":1394,"title":"Error at \"NOT\"","user":{"login":"matrix2019","id":44928963,"node_id":"MDQ6VXNlcjQ0OTI4OTYz","avatar_url":"https://avatars2.githubusercontent.com/u/44928963?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix2019","html_url":"https://github.com/matrix2019","followers_url":"https://api.github.com/users/matrix2019/followers","following_url":"https://api.github.com/users/matrix2019/following{/other_user}","gists_url":"https://api.github.com/users/matrix2019/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix2019/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix2019/subscriptions","organizations_url":"https://api.github.com/users/matrix2019/orgs","repos_url":"https://api.github.com/users/matrix2019/repos","events_url":"https://api.github.com/users/matrix2019/events{/privacy}","received_events_url":"https://api.github.com/users/matrix2019/received_events","type":"User","site_admin":false},"labels":[{"id":533878923,"node_id":"MDU6TGFiZWw1MzM4Nzg5MjM=","url":"https://api.github.com/repos/linq2db/linq2db/labels/bug","name":"bug","color":"b60205","default":true},{"id":895599695,"node_id":"MDU6TGFiZWw4OTU1OTk2OTU=","url":"https://api.github.com/repos/linq2db/linq2db/labels/provider-postgresql","name":"provider-postgresql","color":"336791","default":false},{"id":509185782,"node_id":"MDU6TGFiZWw1MDkxODU3ODI=","url":"https://api.github.com/repos/linq2db/linq2db/labels/sql","name":"sql","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-11-10T18:03:38Z","updated_at":"2018-11-10T19:07:32Z","closed_at":null,"author_association":"NONE","body":"Hello Linq2db team! 👍 \r\n\r\nI have created a c# project using SQL Express.\r\nEverything works fine with db.CreateTable<XY>();\r\n\r\nnow I have changed the DataProvider to PostgreSQLDataProvider.\r\nWhen I call the db.CreateTable<XY>();\r\nI got an exception 42601: Syntaxfehler bei »NOT«\r\n\r\nMaybe my DBConnection class has some errors? I do not use T4.\r\nHere is my dataconnection class\r\n```cs\r\npublic class DBConnection : LinqToDB.Data.DataConnection\r\n{\r\n   \r\n\tpublic DBConnection(DatabaseType typ, string constr) : base(GetDataProvider(typ),constr)\r\n\t{\r\n\r\n\t}\r\n\r\n\tstatic IDataProvider GetDataProvider(DatabaseType typ)\r\n\t{\r\n\r\n\t\tLinqToDB.Common.Configuration.AvoidSpecificDataProviderAPI = true;\r\n\r\n\t\tswitch (typ)\r\n\t\t{\r\n\t\t\tcase DatabaseType.Access:\r\n\t\t\t\treturn new AccessDataProvider();\r\n\t\t\tcase DatabaseType.MSSQL2005:\r\n\t\t\t\treturn new SqlServerDataProvider(\"\", SqlServerVersion.v2005);\r\n\t\t\tcase DatabaseType.MSSQL2008:\r\n\t\t\t\treturn new SqlServerDataProvider(\"\", SqlServerVersion.v2008);\r\n\t\t\tcase DatabaseType.MSSQL2012:\r\n\t\t\t\treturn new SqlServerDataProvider(\"\", SqlServerVersion.v2012);\r\n\t\t\tcase DatabaseType.PostgreSQL:\r\n\t\t\t\treturn new LinqToDB.DataProvider.PostgreSQL.PostgreSQLDataProvider();\r\n\t\t\tcase DatabaseType.SQLite:\r\n\t\t\t\treturn new SQLiteDataProvider();\r\n\t\t}\r\n\t\tthrow new Exception(\"Database is not supported!\");\r\n\t}\r\n\r\n}\r\n```\r\nI use dotnet 4.5, LINQ2DB 2.5.1.0 and  NPGSQL 3.2.5.0\r\n\r\nhelp please :-)\r\n\r\nbest regards"},"comment":{"url":"https://api.github.com/repos/linq2db/linq2db/issues/comments/437612102","html_url":"https://github.com/linq2db/linq2db/issues/1394#issuecomment-437612102","issue_url":"https://api.github.com/repos/linq2db/linq2db/issues/1394","id":437612102,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzYxMjEwMg==","user":{"login":"sdanyliv","id":783759,"node_id":"MDQ6VXNlcjc4Mzc1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/783759?v=4","gravatar_id":"","url":"https://api.github.com/users/sdanyliv","html_url":"https://github.com/sdanyliv","followers_url":"https://api.github.com/users/sdanyliv/followers","following_url":"https://api.github.com/users/sdanyliv/following{/other_user}","gists_url":"https://api.github.com/users/sdanyliv/gists{/gist_id}","starred_url":"https://api.github.com/users/sdanyliv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdanyliv/subscriptions","organizations_url":"https://api.github.com/users/sdanyliv/orgs","repos_url":"https://api.github.com/users/sdanyliv/repos","events_url":"https://api.github.com/users/sdanyliv/events{/privacy}","received_events_url":"https://api.github.com/users/sdanyliv/received_events","type":"User","site_admin":false},"created_at":"2018-11-10T19:07:32Z","updated_at":"2018-11-10T19:07:32Z","author_association":"MEMBER","body":"If you just define\r\n```cs\r\n\t[Column(Name = \"Strasse\")]\r\n\tpublic string Strasse { get; set; }\r\n```\r\nWe don't know size of string and use default value according to Data Provider. Better to define it by yourself\r\n```cs\r\n\t[Column(Name = \"Strasse\", Length = 100)]\r\n\tpublic string Strasse { get; set; }\r\n``` "}}
{"actor":{"display_login":"sdanyliv"}}