M
M
Maxim Shishkov2017-07-25 10:46:22
Python
Maxim Shishkov, 2017-07-25 10:46:22

How to make friends PostgreSQL and MS SQL on the same server?

Good time of the day. It is installed on the MS SQL 2008 + 2012 server. There was a task to install software with PostgreSQL embedded on the server. I wondered about their friendship and possible troubles. Can anyone advise?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vladimir Kuts, 2019-02-16
@xawifoo

In your specific case, then:

>>> test = "[{'tzid': '000000000', 'phone': '000000', 'service': 'test', 'status': 'TZ_NUM_PREPARE'}]"
>>> import json
>>> print(json.loads(test.replace("'", '"')))
[{'tzid': '000000000', 'phone': '000000', 'service': 'test', 'status': 'TZ_NUM_PREPARE'}]
>>> print(json.loads(test.replace("'", '"'))[0]['tzid'])
000000000

JSON is still incorrect.

R
Roman Kitaev, 2019-02-16
@deliro

It's not JSON. Double quotes in JSON

In [6]: x = '[{"tzid": "000000000", "phone": "000000", "service": "test", "statu
   ...: s": "TZ_NUM_PREPARE"}]'

In [7]: x
Out[7]: '[{"tzid": "000000000", "phone": "000000", "service": "test", "status": "TZ_NUM_PREPARE"}]'

In [8]: json.loads(x)
Out[8]: 
[{'tzid': '000000000',
  'phone': '000000',
  'service': 'test',
  'status': 'TZ_NUM_PREPARE'}]

D
DevMan, 2017-07-25
@Trumdu

what exactly is the problem?
they do not interact with each other and do not interfere with each other (except for the consumption of resources).

K
kalapanga, 2017-07-25
@kalapanga

Trouble will be if, for example, postgres is given a non-standard port for some reason, and this port is used by ms sql. With the default settings, there shouldn't be any problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question