pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Thomas Kellerer <shammat@gmx.net>
To: pgsql-sql@lists.postgresql.org
Subject: Re: Bug in tables column data in postgres database
Date: Sat, 5 Mar 2022 09:40:28 +0100
Message-ID: <c2f62415-0255-73e2-26ee-f552e961051a@gmx.net> (raw)
In-Reply-To: <CAOKMkZoQ-7kqjLdJgkZxUGe8ODnF4ABhDL_42CvpdaRku7Uhbg@mail.gmail.com>
References: <CAOKMkZoQ-7kqjLdJgkZxUGe8ODnF4ABhDL_42CvpdaRku7Uhbg@mail.gmail.com>
Sarita Sharma schrieb am 03.03.2022 um 17:45:
> I am a backend(server side) developer and I am using postgres
> database for storing my data to database. I have find a big challenge
> working with postgres database(version 13) as I have find major
> issue working with column in table of database as data keep toggling
> its value.
> eg::
> if I have stored data into table
> bike_table
> ======================================
> bike_name bike_prefix bike_line
> V111 V 111
> W222 W 222
> X333 X 333
> ===========================================
>
> if some other time if query is made for same table data might look like this
> bike_table
> ======================================
> bike_name bike_prefix bike_line
> W111 V 111
> X222 W 222
> X333 X 333
> ===========================================
> So usually bike_name keep changing its name thats seems to me a toggling behaviour.
> Please take this issue as bug and work on this.
It's extremely unlikely that this is a Postgres bug.
What is more likely is, that somewhere in your Java code the values get switched.
One way to find out, is to enable logging of all generated SQL statements
in your Java application. You mentioned JPA, so you are likely to use Hibernate.
This can e.g. be done using:
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
alternatively do it through the configuration of your logging framework.
You can also use "show_sql" in your persistence.xml if I'm not mistaken
(I don't know the details I keep away from obfuscation layers)
Another option is to turn on logging of all DML statements on the Postgres
side, using "log_statement=mod" in postgresql.conf
I am pretty sure with either one of those approaches you will see
that your application actively sends DML statements that change the data
in the database.
Thomas
view thread (25+ messages) latest in thread
Message-ID: <c2f62415-0255-73e2-26ee-f552e961051a@gmx.net>
Permalink: ../c2f62415-0255-73e2-26ee-f552e961051a@gmx.net/
Also on: postgresql.org/message-id/c2f62415-0255-73e2-26ee-f552e961051a@gmx.net
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: shammat@gmx.net, pgsql-sql@lists.postgresql.org
Subject: Re: Bug in tables column data in postgres database
In-Reply-To: <c2f62415-0255-73e2-26ee-f552e961051a@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox