joncrlsn / pgdiff

Compares the PostgreSQL schema between two databases and generates SQL statements that can be run manually against the second database to make their schemas match.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doubt about compare two DB with the same columns but without 'data specifications'

cabezon666 opened this issue · comments

Greetings Mr. Carlson

I want to thank you again for the help that you gave me the last week. But now I have another doubt (a more serious one).

  • I was trying to compare 2 DB's, column by column with command:

pgdiff COLUMN -U xxx-W xxx-H 10.20.1.17 -D loc002 -O "sslmode = disable" \ -u xxx -w xxx -h 10.20.1.17 -d loc004 -o "sslmode = disable"

  • I figured out that when I compare 2 tables, with the same type of columns (as I show in the picture attached) with no data restriction, show the message:
    ALTER TABLE dbname ALTER COLUMN x TYPE character varying(1024)
    And well, in reality there is not a difference between these columns, the just do no have a data restriction.
    Could you please give me an advice of what to do? Because what I need to do is to see if 2 databases are different in terms of columns, and if these are identical i do not need to plot a text.
    Please let me know if I have been clear of what if my issue. I am attaching some pictures about the issue.

error1

error4

Thank you again, kind regards,

Eduardo W.

Hi Eduardo. I'm working on version 0.9.2 now. I appreciate knowing that some people specify a character varying field without specifying the size. I wasn't aware that was possible so I have tested it and found that you are correct. This is a bug that I will work on. I hope to have the next version available soon (like in the next 1-2 weeks).

Thanks for helping find issues.

  • Jon

Hi Eduardo, I had time to work on it tonight and so I made the fix, did some manual testing, and generated new binaries that are not on the main page, however they are in the branch listed below. Let me know how this goes for you:

https://github.com/joncrlsn/pgdiff/tree/release/0.9.3

Greetings Mr. Carlson, how are things?

Thanks for your quick reply and sorry for my delay response.

I will try the update that you made and will give you my response as soon as I can.

Thank you again, for my part and my colleagues.

Eduardo.

Thank you for the suggestion for improvement!

@cabezon666 Your character varying fix is in the 1.0 beta 1 pre-release. Let me know if you find other problems. Thank you!