PostgreSQL: Clone rows but replace one column
Image I have the following table: (in reality there are more columns)
SQL table with thousands of columns
I need to store data(float) from 20,000 sensors once a second. I originally wanted to create the following table:
Getting SQL UPDATE to work the same as SQL DELETE wrt Cascading Ref in PostgreSQL
I’ve constructed a table in Postgres (v14.4) like this:
Optimal implementation of storing single strings in postgresql for search speed
I have a database that will have 1m+ records of the following shape:
What causes a row estimate declared on a custom function to sometimes be ignored?
I have created the following custom SQL function on a PostgreSQL 16.1 server:
How can I find the highest ancestor in a tree?
I have the following 2 SQL tables
Combine two tables doing row count based on hour value in timestamp
I’ve got two tables:
How to format time interval in PostgreSQL from “29 days 02:41:44” to a decimal number of days?
I’m trying to change the format of time_discrep (below) into a fraction of days.
Postgres Error in running SQL from dump on COPY command [duplicate]
This question already has answers here: PostgreSQL: database restore from dump – syntax error (3 answers) Closed yesterday. I created a dump from one local database and attempted to load it on another machine. When I attempt to load the dumped database it runs the first 1000+ lines until it hits this code; — — […]
How to efficiently select two counts from a table
I have a table, and I want to efficiently to get total count of tuples in the table, and total count of tuples with a filter.