Questions tagged [PostgreSQL] (1722)

1
answer

What is the best option of Pereleski million rows from one DB to another using Pandas?

There is a task overflow multiple tables (~10 million rows each / ~ 20 columns) from MSSQL to Postgres. Now I pour them using python+pandas. Poured standard: reading from MSSQL (pd.read_sql()), and the resulting DataFrame is poured into another database(pd.to_sql()). Method working, but it works, in my opinion, quite long -...
delfina asked March 31st 20 at 15:49
0
answer

How to bind a nested object with id of the external object?

Good day! Faced with this problem, there is a Json object where invested another object. How to bind a nested object with id of the external object in one json file. I tried to use annotations with Hibernate but I can't do anything. For example:{ "total": 1, "items": [ { "path": 4444", "id": 34", "nmb": 6, "name": "te...
Herman4 asked March 31st 20 at 15:47
2
answers

How to design a database for the project on Django?

The task is this: to think of the database for CRM b(backend - Jung, DBMS Postgres), where each user has its own table of services the customer table (and we all know that a person can have multiple rooms, etc., that generates additional tables), etc., but also he may have several, say, companies or branches of companies Ex...
Eileen89 asked March 31st 20 at 15:45
1
answer

To select rows in PostgreSQL table where id is in array JSONB?

PostgreSQL 11. A sign, for instance:id|login |password|role |disabled|settings| --|---------|--------|-------|--------|--------| 1|admin |1 |admin |false |{} | 2|guest |1 |guest |false |{} | 4|test |1 |manager|false |{} | 5|test2 |1 |manager|false |{} | There is such JSONB:{ "perms": [ 1, 2, 3 ], "qwe": true } How to ...
Haven.Yost asked March 31st 20 at 15:30
3
answers

How should I store the content in the database: HTML vs MarkDown?

There is a very large database of articles. Right now they are in html format. Right now, go to PostgreSQL, and had the idea to store text in markdown. The question is, will this use? Right now is ~500GB. If we move everything to the markdown, they will take up less space in the database? When the results on the website the...
marilyne asked March 31st 20 at 15:28
1
answer

Error writing to database, how to fix?

Hello, I faced a problem writing to the database. I do not understand what the problem is, I had worked with this module, such problems did not arise. Trying to pass a list in which elements 136. Error %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s...
Lulu_Stehr asked March 31st 20 at 15:03
1
answer

How can I update RT index using sphinx.api in PostgreSQL?

Conventional indexing works, but real time no. I understand that the index record is updated in the database. But what to do? Of course, the usual entry index does not update.Here in comments I read that there are two ways to update: via sphinxQL and via sphinx.api. I've already set up a search via sphinx.api, and now we ne...
Malik asked March 31st 20 at 15:00
1
answer

Is there a difference between an expression and a transaction?

If two requests (read and update) occur within the same transaction READ COMMITED, then, of course, we can't be sure that the update will happen. Data could have changed in another transaction. How about one expression? Judging from the documentation inside the visible expression of the same row. Can we be sure that in the ...
presley_Ward asked March 31st 20 at 14:58
0
answer

How to fix the error?

How to fix the error Caused by: org.postgresql.util.PSQLException: ERROR: relation "users" does not exist?table for customers:@Entity @Table(name = "Users") public class User { @Id private String login; private String phone; //link to the photo private String photo; @ManyToMany @JoinTable(name = "USER_Advertisement", ...
clarissa_Dibbe asked March 31st 20 at 14:53
1
answer

How to do import a demo database Postgres (demo-big.zip)?

Hello! How to do import a demo database in Postgres 11 (demo-big.zip)? What I did : 1. Downloaded demo from the site database (https://postgrespro.ru/education/demodb) 2. tried the command postgres=# \i < file path> (result :No such file or directory) 3. I tried psql-h hostname -d databasename -U username-f file.sql a...
Gisselle.Kutch asked March 31st 20 at 14:42