Hi Harish,
You can use EXCEPT operator for this purpose, i.e (select * from source_table except select * from target_table;) and vice versa. Thanks.
On Mon, Aug 12, 2024, 4:47 PM Kashif Zeeshan <kashi.zeeshan@xxxxxxxxx> wrote:
HiYou can also use pgAdmin for schema comparison, please check the below link.ThanksKashif ZeeshanOn Mon, Aug 12, 2024 at 3:48 PM Muhammad Usman Khan <usman.k@xxxxxxxxxxx> wrote:Dear Harish,
If you are referring to data validation then the following query might give you the desired results
/pg_dump -U postgres -s target -p 5334 > /tmp/db2_schema.sql ./pg_dump -U postgres -s source > /tmp/db1_schema.sql diff /tmp/db1_schema.sql /tmp/db2_schema.sql
Adjust your ports and databases name accordinglyRegards
Muhammad Usman KhanOn Mon, 12 Aug 2024 at 15:41, Harish Harish <hpt3009@xxxxxxxxx> wrote:Dear AdminsIs there any way to do data comparison for the database scheme in PostgreSQL between old version(10) and new version (15.0).Just migrated database from version 10 to 15.Much appreciate your help.Regards,Hari