Re: advanced option set NG when create a PostgreSQL ODBC with windows powershell

"Inoue, Hiroshi" <[email protected]> Sun, 15 Sep 2019 09:04:17 +0900
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------18563F3F4F3E5529B7A031F1
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

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.


---
このメールは、AVG によってウイルス チェックされています。
http://www.avg.com

--------------18563F3F4F3E5529B7A031F1
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">
    Hi,<br>
    <br>
    <div class="moz-cite-prefix">On 2019/09/10 14:07, Zeng, Lei wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BYAPR12MB29670411604C44D7127E2F5D93B60@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)">
      <style><!--
/* Font Definitions */
@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 ゴシック";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
/* 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";}
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-compose;
	font-family:"Arial","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Arial","sans-serif";}
/* Page Definitions */
@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:10.0pt" lang="EN-US">Hi<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" 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<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<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Actions
            :<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">1.
            install PostgreSQL ODBC<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">2.
            Run powershell  with admin role<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">3.
            Run <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")<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Result:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">1.PostgreSQLWithPowerShell
             was created successfully.<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></p>
      </div>
    </blockquote>
    <br>
    How did you confirm the setting?<br>
    <br>
    regards,<br>
    Hiroshi Inoue<br>
    <br>
    <blockquote type="cite"
cite="mid:BYAPR12MB29670411604C44D7127E2F5D93B60@BYAPR12MB2967.namprd12.prod.outlook.com">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"><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.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;MS ゴシック&quot;">※</span><span
            style="font-size:10.0pt" lang="EN-US">see
            <a class="moz-txt-link-freetext" href="https://odbc.postgresql.org/docs/config-opt.html">https://odbc.postgresql.org/docs/config-opt.html</a><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt" lang="EN-US">Question:<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<o:p></o:p></span></p>
      </div>
      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.<br>
    </blockquote>
  <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
	<tr>
      <td style="width: 55px; padding-top: 18px;"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt=""  width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
		<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">ウイルス フリー。 <a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avg.com</a> 		</td>
	</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>

--------------18563F3F4F3E5529B7A031F1--