Answer the question
In order to leave comments, you need to log in
Why is the database created through psql not suitable for use in 1C?
After creating a 1C database in psql, when trying to add a database to a cluster, an error message appears that:
DATABASE is not suitable for use
Created a database in 2 ways:
-- Database: MyTest
-- DROP DATABASE "MyTest";
CREATE DATABASE "MyTest"
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'ru_RU.UTF-8'
LC_CTYPE = 'ru_RU.UTF-8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
\q
CREATE DATABASE MyTest WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'ru_RU.UTF-8' LC_CTYPE = 'ru_RU.UTF-8';
pg_dump -C -h localhost -U postgres usos_test > MyTest.sql
-- DROP DATABASE "MyTest";
CREATE DATABASE "MyTest"
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'ru_RU.UTF-8'
LC_CTYPE = 'ru_RU.UTF-8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
\q
psql -h remote.app.serv01 -U postgres --single-transaction < MyTest.sql
Answer the question
In order to leave comments, you need to log in
Manually, bases for 1C are usually not created for several reasons.
One of the main ones is the structure of tables (including the names of fields and tables) should be exactly how 1C plans to use it. (The names of the tables will be written in accordance, in a separate table)
Also, after creation, this database structure should be in the def. as binary data in several "Service Tables", which is extremely problematic to recreate exactly.
If you have a desire to create databases with a script, the easiest way is to create a "dummy" from 1C, create a backup, and then deploy it where you need.
ZY: even an empty database created from 1C, in fact, will not be empty, it will contain a lot of service data. That is why your database gave an error when connecting to the cluster (not found, service data in service tables)
Create an empty server database in 1C, specify "create a database if it does not exist" and see what an "empty" 1C database looks like in postgre.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question