For such a popular software product as 1C: Enterprise, developers have to ensure cross-platform and compatibility with a large number of applications. In particular, with each new version adds support for all new DBMS.
Many enterprises (mainly small and medium ones) are still not in a hurry to move from version 7.7 to 8.x. And in this case, the only compatible DBMS provided by the developers is Microsoft SQL. The option is very expensive for a small company: in addition to licenses for workstations and MS SQL Server, MS Server is also required.
An alternative solution could be
SELTA @ Etersoft technology, developed by St. Petersburg company Etersoft. SELTA is used in conjunction with a free Postgre SQL DBMS and allows 1C 7.7 to work with SQL databases. The product is commercial and is positioned by the developer as an affordable (cost of the solution is from 15,000 rubles) an alternative to MS SQL Server.
')
SELTA @ Etersoft is an emulator of MS SQL Server on Postgre SQL. translating SQL queries from the T-SQL dialect to pgSQL. Installing and configuring SELTA @ Etersoft on a client PC is trivial: launching the installer, setting up a connection with Postgre SQL and creating a database via the GUI with a few mouse clicks. It is much more interesting to consider technology from the inside. At first glance, SELTA @ Etersoft performs the following actions when processing each request:
Software sends request
SELECT TOP 2 * FROM tab;
.
.
.
The request is received, transmitted and sent to Postgre SQL
SELECT * FROM tab LIMIT 2;
.
Postgre SQL accepted the request, processed it, returned the result that is returned by the software that made the request.
All these actions are called translation from one SQL dialect to another.
The ODBC driver for MS SQL Server in the registry is changed to Postgres driver. Requests in this driver are captured, parsed, and converted into Postgre SQL format.

In order for such emulation to become possible, SELTA @ Etersoft solves a number of problems related to the dissimilarity of the two DBMSs, in particular, the difference in locks and the lack of dynamic cursors in Postgres. For example, the problem with missing dynamic queries is solved by a table with changes and automatic creation of triggers on all tables with a record of all changes. Thanks to this, the driver finds out whether it is necessary to recreate the cursor created by the dynamic one.
Meanwhile, such a scheme of work creates restrictions on the use of SELTA @ Etersoft and does not allow the translator to become fully universal. At the moment, it only supports programs running through the ODBC driver. However, the developers' plans are to implement SELTA @ Etersoft as a server, which will ensure compatibility with all applications using MS SQL.
The Postgres and MS SQL Server locking system is quite non-trivial. But this question goes beyond the first acquaintance with technology, and it can be considered in more detail in the continuation of the article, if it arouses the interest of readers.