I recently used DBeaver (version: 7.0.4) to connect to Postgresql and I stepped on a big hole. It took two or three hours. The result was a problem with DBeaver itself. The following is the process of reproducing the hole.
- Create a library (af4pg)
- Create table
Create table goods under public schema:
-- public.goods definition
-- Drop table
-- DROP TABLE public.goods;
CREATE TABLE public.goods (
gid int2 NOT NULL GENERATED ALWAYS AS IDENTITY,
gname text NULL,
created_time timestamp NOT NULL,
modified_time timestamp NOT NULL,
created_by text NOT NULL,
modified_by text NOT NULL,
gdesc text NULL,
gweight float4 NULL,
gsize float4 NULL
);
After creation, it is shown in the following figure:
3. Use springboot to connect to postgresql, and perform the insert operation
When running the program, the console reports the following error:
org.postgresql.util.PSQLException: ERROR: relation "public.goods" does not exist
The error message table does not exist, which is really strange. It is obviously created successfully, why does it not exist. The analysis at that time mainly started from the following steps:
a. Code
b. Configuration file
c. Development environment
d. Database service
results These 4 steps are all right, I really don’t understand, I shut down Dbeave and meditated for ten minutes. What's the problem, so I opened Dbeaver again. At this time, a miracle happened, and the created table was gone, my God. . . What the hell is this. The program executes successfully after re-creation.