You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
Trying to update the value of a se
lect resultset fails.
(the same approach works on Oracle and MSSQL)
Driver Version?
PostgreSQL JDBC Driver 42.2.18
Java Version?
OpenJDK 8 u275
OS Version?
Windows 10
PostgreSQL Version?
12.5
To Reproduce
Steps to reproduce the behaviour:
Create test table with one record:
drop table testtable;
CREATE TABLE testtable (
public_id VARCHAR(255),
deletion_date TIMESTAMP
);
INSERT INTO testtable (public_id) VALUES ('abc');
Expected behaviour
deletion_date column should be updated to the assigned value, following select will then not fetch it as it already has a value (!=null)
Logs
Server:
2021-02-01 15:45:44.320 CET [1480] ERROR: syntax error at end of input at character 50
2021-02-01 15:45:44.320 CET [1480] STATEMENT: UPDATE testtable SET "deletion_date" = $1 WHERE
2021-02-01 15:45:44.329 CET [1480] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.
@davecramer thanks for the swift reply. Indeed if I add a primary key then it works.
In my real application, I had to remove it earlier today as I got errors that the unique constraint is violated but once I removed the constraint I still had no duplicate entries. Guess I have to debug the cause of this further.
I'm submitting a ...
Describe the issue
Trying to update the value of a se
lect resultset fails.
(the same approach works on Oracle and MSSQL)
Driver Version?
PostgreSQL JDBC Driver 42.2.18
Java Version?
OpenJDK 8 u275
OS Version?
Windows 10
PostgreSQL Version?
12.5
To Reproduce
Steps to reproduce the behaviour:
drop table testtable;
CREATE TABLE testtable (
public_id VARCHAR(255),
deletion_date TIMESTAMP
);
INSERT INTO testtable (public_id) VALUES ('abc');
Expected behaviour
deletion_date column should be updated to the assigned value, following select will then not fetch it as it already has a value (!=null)
Logs
Server:
2021-02-01 15:45:44.320 CET [1480] ERROR: syntax error at end of input at character 50
2021-02-01 15:45:44.320 CET [1480] STATEMENT: UPDATE testtable SET "deletion_date" = $1 WHERE
2021-02-01 15:45:44.329 CET [1480] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.
Client: log attached
client.log
The text was updated successfully, but these errors were encountered: