Re: advanced option set NG when create a PostgreSQL ODBC with windows powershell
"Inoue, Hiroshi" <[email protected]> Mon, 16 Sep 2019 14:24:21 +0900
| Newsgroups | gmane.comp.db.postgresql.odbc |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------1F26D53DDE0751EE41FC5B20 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 2019/09/16 10:54, Zeng, Lei wrote: > > Hi Hiroshi Inoue > > Thanks to regard my message. > > >How did you confirm the setting? > > After run ten PowerShelll cmdlet do like this: > > →「Windows10 app search※ the button next to the windows btn at the > left-bottom of the windows desktop」 > > → input「ODBC」and search > > →then you can openthe os ODBC settings panel > > →click 「system DNS」tab > > →you can find that odbc name that added by PowerShelll > > → double click the name then you can confirm thesettings. > > config [MaxVarcharSize=200] is the optional level you can find it at > the 「data source」panel > Where do you find the setting of "Trusted_Connection"?. "Trusted_Connection" isn't an option of psqlodbc. regards, Hiroshi Inoue > *差出人:*Inoue, Hiroshi [mailto:[email protected]] > *送信日時:*2019年9月15日9:04 > *宛先:*Zeng, Lei > *CC:*[email protected] > *件名:*Re: advanced option set NG when create a PostgreSQL ODBC with > windows powershell > > Hi, > > On 2019/09/10 14:07, Zeng, Lei wrote: > > Hi > > My OS is windows10 64bit > > When I try to create a PostgreSQL ODBC with powershell > > Actions : > > 1. install PostgreSQL ODBC > > 2. Run powershell with admin role > > 3. Run > > Add-OdbcDsn PostgreSQLWithPowerShell -DriverName "PostgreSQL > Unicode(x64)" -DsnType System -SetPropertyValue > @("Server=localhost", "Trusted_Connection=Yes", "Database=appdb", > "Port=5432", "UserName=test", "Password=test", "MaxVarcharSize=200") > > Result: > > 1.PostgreSQLWithPowerShell was created successfully. > > 2.The config "Server=localhost", "Trusted_Connection=Yes", > "Database=appdb", "Port=5432", "UserName=test", "Password=test" > was setted successfully. > > > How did you confirm the setting? > > regards, > Hiroshi Inoue > > > 3.But the advanced option config "MaxVarcharSize=200" was not work. > > ※see https://odbc.postgresql.org/docs/config-opt.html > > Question: > > how can the config [MaxVarcharSize=200] work with powershell ? thanks > > Disclaimer: This email and any attachments are sent in strictest > confidence for the sole use of the addressee and may contain legally > privileged, confidential, and proprietary data. If you are not the > intended recipient, please advise the sender by replying promptly to > this email and then delete and destroy this email and any attachments > without any further use, copying or forwarding. > > Disclaimer: This email and any attachments are sent in strictest > confidence for the sole use of the addressee and may contain legally > privileged, confidential, and proprietary data. If you are not the > intended recipient, please advise the sender by replying promptly to > this email and then delete and destroy this email and any attachments > without any further use, copying or forwarding. --- このメールは、AVG によってウイルス チェックされています。 http://www.avg.com --------------1F26D53DDE0751EE41FC5B20 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body text="#000000" bgcolor="#FFFFFF"> <br> <br> <div class="moz-cite-prefix">On 2019/09/16 10:54, Zeng, Lei wrote:<br> </div> <blockquote type="cite" cite="mid:BYAPR12MB296758EA09037240A452C750938C0@BYAPR12MB2967.namprd12.prod.outlook.com"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="Generator" content="Microsoft Word 14 (filtered medium)"> <!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style><![endif]--> <style><!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face {font-family:"MS ゴシック"; panose-1:2 11 6 9 7 2 5 8 2 4;} @font-face {font-family:"MS ゴシック"; panose-1:2 11 6 9 7 2 5 8 2 4;} @font-face {font-family:"MS UI Gothic"; panose-1:2 11 6 0 7 2 5 8 2 4;} @font-face {font-family:"MS Pゴシック"; panose-1:2 11 6 0 7 2 5 8 2 4;} @font-face {font-family:"\@MS Pゴシック"; panose-1:2 11 6 0 7 2 5 8 2 4;} @font-face {font-family:"\@MS ゴシック"; panose-1:2 11 6 9 7 2 5 8 2 4;} @font-face {font-family:"\@MS UI Gothic"; panose-1:2 11 6 0 7 2 5 8 2 4;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0mm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; font-size:10.5pt; font-family:"Arial","sans-serif"; color:black;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.17 {mso-style-type:personal; font-family:"Arial","sans-serif"; color:windowtext;} span.18 {mso-style-type:personal-reply; font-family:"Arial","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:612.0pt 792.0pt; margin:99.25pt 30.0mm 30.0mm 30.0mm;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026"> <v:textbox inset="5.85pt,.7pt,5.85pt,.7pt" /> </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> <div class="WordSection1"> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US">Hi Hiroshi Inoue<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US">Thanks to regard my message.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US">>How did you confirm the setting?<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS Pゴシック""> <span lang="EN-US">After run ten PowerShelll cmdlet do like this:<o:p></o:p></span></span></p> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US"> </span><span style="font-size:12.0pt;font-family:"MS Pゴシック"">→</span><span style="font-size:12.0pt;font-family:"MS Pゴシック";mso-fareast-language:ZH-CN"> </span><span style="font-size:12.0pt;font-family:"MS Pゴシック"">「<span lang="EN-US">Windows10 app</span> </span><span style="font-size:12.0pt;font-family:"MS Pゴシック";mso-fareast-language:ZH-CN" lang="EN-US">search</span><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US"> </span><span style="font-size:12.0pt;font-family:"MS ゴシック"">※ </span><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US">the button next to the windows btn at the left-bottom of the windows desktop</span><span style="font-size:12.0pt;font-family:SimSun;mso-fareast-language:ZH-CN" lang="ZH-CN">」</span><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="text-indent:6.0pt"><span style="font-size:12.0pt;font-family:"MS ゴシック"">→ <span lang="EN-US">input</span>「<span lang="EN-US">ODBC</span>」<span lang="EN-US">and search<o:p></o:p></span></span></p> <p class="MsoNormal" style="text-indent:6.0pt"><span style="font-size:12.0pt;font-family:"MS ゴシック"">→<span lang="EN-US"> then you can </span></span><span style="font-size:12.0pt;font-family:"MS ゴシック";mso-fareast-language:ZH-CN" lang="EN-US">open</span><span style="font-size:12.0pt;font-family:"MS ゴシック"" lang="EN-US"> the os ODBC settings panel<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS ゴシック"" lang="EN-US"></span><span style="font-size:12.0pt;font-family:"MS ゴシック"">→</span><span style="font-size:12.0pt;font-family:"MS ゴシック";mso-fareast-language:ZH-CN"> <span lang="EN-US">click </span></span><span style="font-size:12.0pt;font-family:"MS ゴシック"">「<span lang="EN-US">system DNS</span>」</span><span style="font-size:12.0pt;font-family:"MS ゴシック";mso-fareast-language:ZH-CN" lang="EN-US"> tab </span><span style="font-size:12.0pt;font-family:"MS ゴシック"" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:12.0pt;text-indent:-12.0pt"><span style="font-size:12.0pt;font-family:"MS ゴシック"" lang="EN-US"> </span><span style="font-size:12.0pt;font-family:"MS ゴシック"">→<span lang="EN-US"> you can find that odbc name that added by </span></span><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US">PowerShelll <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:11.25pt;mso-para-margin-left:.5gd;text-indent:-6.0pt"> <span style="font-size:12.0pt;font-family:"MS Pゴシック"">→<span lang="EN-US"> double click the name then you can confirm the</span></span><span style="font-size:12.0pt;font-family:"MS Pゴシック";mso-fareast-language:ZH-CN" lang="EN-US"> </span><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US">settings.<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left:10.25pt;mso-para-margin-left:.5gd;text-indent:-5.0pt"> <span style="font-size:10.0pt;color:#1F497D" lang="EN-US"> </span><span style="font-size:10.0pt" lang="EN-US">config [MaxVarcharSize=200] is the optional level you can find it at the </span><span style="font-size:10.0pt;font-family:"MS Pゴシック"">「</span><span style="font-size:10.0pt" lang="EN-US">data source</span><span style="font-size:10.0pt;font-family:"MS Pゴシック"">」</span><span style="font-size:10.0pt;mso-fareast-language:ZH-CN" lang="EN-US">panel</span></p> </div> </blockquote> <span style="font-size:10.0pt" lang="EN-US"><br> Where do you find the setting of "Trusted_Connection"?.<br> </span><span style="font-size:10.0pt" lang="EN-US"><span style="font-size:10.0pt" lang="EN-US">"Trusted_Connection" isn't an option of psqlodbc.<br> </span><br> regards,<br> Hiroshi Inoue<br> </span><br> <blockquote type="cite" cite="mid:BYAPR12MB296758EA09037240A452C750938C0@BYAPR12MB2967.namprd12.prod.outlook.com"> <div class="WordSection1"> <p class="MsoNormal" style="margin-left:10.25pt;mso-para-margin-left:.5gd;text-indent:-5.0pt"><span style="font-size:10.0pt;color:#1F497D;mso-fareast-language:ZH-CN" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D" lang="EN-US"><o:p> </o:p></span></p> <div> <div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0mm 0mm 0mm"> <p class="MsoNormal" style="text-align:left" align="left"><b><span style="font-size:9.0pt;font-family:"MS UI Gothic";color:windowtext">差出人<span lang="EN-US">:</span></span></b><span style="font-size:9.0pt;font-family:"MS UI Gothic";color:windowtext" lang="EN-US"> Inoue, Hiroshi [<a class="moz-txt-link-freetext" href="mailto:[email protected]">mailto:[email protected]</a>] <br> </span><b><span style="font-size:9.0pt;font-family:"MS UI Gothic";color:windowtext">送信日時<span lang="EN-US">:</span></span></b><span style="font-size:9.0pt;font-family:"MS UI Gothic";color:windowtext" lang="EN-US"> 2019</span><span style="font-size:9.0pt;font-family:"MS UI Gothic";color:windowtext">年<span lang="EN-US">9</span>月<span lang="EN-US">15</span>日<span lang="EN-US"> 9:04<br> </span><b>宛先<span lang="EN-US">:</span></b><span lang="EN-US"> Zeng, Lei<br> </span><b>CC<span lang="EN-US">:</span></b><span lang="EN-US"> <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a><br> </span><b>件名<span lang="EN-US">:</span></b><span lang="EN-US"> Re: advanced option set NG when create a PostgreSQL ODBC with windows powershell<o:p></o:p></span></span></p> </div> </div> <p class="MsoNormal" style="text-align:left" align="left"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Hi,<o:p></o:p></span></p> <div> <p class="MsoNormal"><span lang="EN-US">On 2019/09/10 14:07, Zeng, Lei wrote:<o:p></o:p></span></p> </div> <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Hi</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">My OS is windows10 64bit</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">When I try to create a PostgreSQL ODBC with powershell</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Actions :</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">1. install PostgreSQL ODBC</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">2. Run powershell with admin role</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">3. Run </span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Add-OdbcDsn PostgreSQLWithPowerShell -DriverName "PostgreSQL Unicode(x64)" -DsnType System -SetPropertyValue @("Server=localhost", "Trusted_Connection=Yes", "Database=appdb", "Port=5432", "UserName=test", "Password=test", "MaxVarcharSize=200")</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Result:</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">1.PostgreSQLWithPowerShell was created successfully.</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">2.The config "Server=localhost", "Trusted_Connection=Yes", "Database=appdb", "Port=5432", "UserName=test", "Password=test" was setted successfully.</span><span lang="EN-US"><o:p></o:p></span></p> </blockquote> <p class="MsoNormal" style="text-align:left" align="left"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US"><br> How did you confirm the setting?<br> <br> regards,<br> Hiroshi Inoue<br> <br> <br> <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">3.But the advanced option config "MaxVarcharSize=200" was not work.</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:"MS ゴシック"">※</span><span style="font-size:10.0pt" lang="EN-US">see <a href="https://odbc.postgresql.org/docs/config-opt.html" moz-do-not-send="true">https://odbc.postgresql.org/docs/config-opt.html</a></span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Question:</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">how can the config [MaxVarcharSize=200] work with powershell ? thanks</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="text-align:left" align="left"><span style="font-size:12.0pt;font-family:"MS Pゴシック"" lang="EN-US">Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding.</span></p> </div> </blockquote> <blockquote type="cite" cite="mid:BYAPR12MB296758EA09037240A452C750938C0@BYAPR12MB2967.namprd12.prod.outlook.com">Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding. </blockquote> <br> <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"> <br /><br /> <hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' /> <table style='border-collapse:collapse;border:none;'> <tr> <td style='border:none;padding:0px 15px 0px 8px'> <a href="http://www.avg.com/internet-security"> <img border=0 src="http://static.avast.com/emails/avg-mail-stamp.png" alt="AVG のロゴ" /> </a> </td> <td> <p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'> このメールは、AVG アンチウイルス ソフトウェアでウイルス チェックされています。 <br><a href="http://www.avg.com/internet-security">www.avg.com</a> </p> </td> </tr> </table> <br /> <a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body> </html> --------------1F26D53DDE0751EE41FC5B20--