EN VI
Posts (0)
Questions (16)
2024-03-11 01:30:06
postgres is on the postgres-db-network but node_app is not. so they're not networked together. So they can't talk. Thus, docker does not expose their container names to each other as resolvable host...
Tags: node.js postgresql docker
2024-03-11 11:30:05
The transaction doesnt finish until the end of the method. The save doesnt flush until the transaction finishing prompts it to. So yes, you could get a constraint violation that rolls back the save af...
Tags: java spring postgresql
2024-03-11 22:30:09
So, let's create the schema: create table mytable(col1 text, col2 text); insert into mytable(col1, col2) values ('some_string', '{key1:0, key2:1, key3:0}'), ('some_string', '{key1:0, key2:0, key3:0}'...
Tags: sql string postgresql
2024-03-11 23:00:10
If you want this as a one-off update, use row_number() window function and set up the window to be partitioned by client_id: demo with cte as (select id,row_number()over w1 as number from...
2024-03-12 23:00:08
A DO statement is a string literal, and you cannot substitute a psql variable inside a string literal. Moreover, psql variables are not read with current_setting() — that is for configuration paramete...
Tags: postgresql psql
2024-03-13 14:00:04
Assuming that the most recent record would be the one with the greatest created_at value, you could use an INSERT INTO ... SELECT as follows: INSERT INTO users_ill (user_id) SELECT $1 WHERE NOT EXISTS...
Tags: sql node.js postgresql
2024-03-13 15:30:04
Not sure what is happening here. Django fetches the data from db and sends it to the browser, but it doesn't "sees" the ID while trying to write the data to the db. Django does not generate ids, tha...
Tags: python django postgresql
2024-03-13 17:00:05
Use this to inspect your execution plans. These don't add up because they don't have to. From Using EXPLAIN in the doc: The Planning time shown by EXPLAIN ANALYZE is the time it took to generate the...
Tags: postgresql explain
2024-03-13 23:00:06
Not sure about the question, but to insert a date you can do it like this: INSERT INTO appointments (appointment_date) VALUES('2024-03-01'); Or for today: INSERT INTO appointments (appointment_date)...
2024-03-14 10:00:05
You've passed incorrect arguments to jsonb_set. The correct arguments are... jsonb_set ( target jsonb, path text[], new_value jsonb [, create_if_missing boolean ] ) → jsonb You're missing the path.
Tags: postgresql

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login