pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Першин Юрий Петрович <pershin@prosoftsystems.ru>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: BUG: copyConnAttributes should decode_or_remove_braces for user name too
Date: Wed, 23 Dec 2020 00:44:03 +0000
Message-ID: <0feaa51970b9462bacb803675ca9155b@prosoftsystems.ru> (raw)

Hi
1. Create user:
CREATE ROLE "{te{}st" NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT LOGIN PASSWORD '{}p';

2. Create pgpass.vbs file
Set c = CreateObject("ADODB.Connection")
c.Open "database=POLL_TEST;Server=test-serv14.test.domain.com;UID={{te{}}st};Provider=MSDASQL;Password={{}}p};Driver={PostgreSQL UNICODE};Port=5432;Debug=1;"
Set cmd = CreateObject("ADODB.Command")
Set cmd.ActiveConnection = c
cmd.CommandText = "SELECT 1"
cmd.CommandType = 1 'adCmdText
Set r = CreateObject("ADODB.Recordset")
r.Open cmd, , 1, 3, 1 'ctKeySet, ltOptimistic, adCmdText
MsgBox r.Fields(0).Value
r.Close

3. execute wscript.exe pgpass.vbs

Message-ID: <0feaa51970b9462bacb803675ca9155b@prosoftsystems.ru>
Permalink:  ../0feaa51970b9462bacb803675ca9155b@prosoftsystems.ru/
Also on:    postgresql.org/message-id/0feaa51970b9462bacb803675ca9155b@prosoftsystems.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: pershin@prosoftsystems.ru
  Subject: Re: BUG: copyConnAttributes should decode_or_remove_braces for user name too
  In-Reply-To: <0feaa51970b9462bacb803675ca9155b@prosoftsystems.ru>
  References: <0feaa51970b9462bacb803675ca9155b@prosoftsystems.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox