V
V
Vitaly2018-12-10 15:55:38
PostgreSQL
Vitaly, 2018-12-10 15:55:38

How to work with Postgres and 1s database?

All the best!
Such a thing: there is a remote server on Debian OS, on which Postgres is installed.
There is a 1s client (application) that should use this remote server as a server for 1s. The 1s programmer managed to set up the above scheme and upload an already existing directory there.
Now I'm trying to work with this database, but there's something like a mess with tables, firstly there are a lot of them, there are strange table names, almost all of them are empty ....
Tell me how to get data from such a database?
P.S. This was done in order to be able to connect different web services (bot, site) to the database.
That is, there is one database, with it in the usual mode / 1c environment, data is changed and there is a site that also receives up-to-date data from there

Answer the question

In order to leave comments, you need to log in

7 answer(s)
M
Melkij, 2018-12-10
@melkij

Long and painfully smoke this storehouse of delirium and the Augean stables of shit code called 1s.
These people basically do not know how to work with a DBMS. And in the database there is an absolute hell and a mess, that's right.
Most likely, it would be much better to abandon this idea and export the necessary data separately. And to intersect with this craft only through a narrow export slot, with the indispensable validation of all passing data without exception.

A
AndroidDev2015, 2018-12-10
@AndroidDev2015

Now I'm trying to work with this database, but there's something like a mess with tables, firstly there are a lot of them, there are strange table names, almost all of them are empty ....
Tell me how to get data from such a database?

1. Find out the database data model, without it, waste your time. Or at the creator of a DB or in the documentation of that system in which the DB was created.
2. Write an API, but at least in the same 1s, she can do this from version 8.0.

P
PloAl, 2018-12-10
@PloAl

You can find out the correspondence between postgreSQL tables and internal 1C objects using the GetDatabaseStorageStructure() method.
But it is important to remember that after the first unloading - loading into *.dt , the table names will change.
It is possible to connect separate tables to the 1s client as an external data source.

D
Dmitry Kinash, 2018-12-11
@Dementor

The 1s programmer managed to set up the above scheme

The joke is that there is no scheme above and therefore they advise nonsense.
I will simplify to theses:
1) There is a 1C client that works with a 1C server
2) The 1C server stores its data in some DBMS in a form optimized for itself
3) 1C can use 4 systems as a DBMS, including PostgreSQL
4) As an OS for the 1C server, you can also use Debian.
Where did your programmer upload the directory? In the transit table on postgre? Fine! If ODBC drivers are installed, then your ruby ​​on rails and 1C will be able to read and write this common table.

K
Konstantin, 2018-12-11
@fosihas

and you can clarify what was meant:
1. v8.1c.ru/overview/Term_000000662.htm
or
2. v8.1c.ru/overview/Term_000000581.htm, in
total, the answers will be different.

A
Alexander Yudakov, 2018-12-11
@AlexanderYudakov

Correspondence between 1C configuration object identifiers and DBMS field and table names:
https://www.forum.mista.ru/topic.php?id=531348
https://its.1c.ru/db/metod8dev#content:1798: hddoc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question