Giter Site home page Giter Site logo

Comments (4)

kworr avatar kworr commented on September 2, 2024 1

Yeah, I was suspecting Greenplum but wasn't sure about that.

First of all I find it totally wrong to move uniqueness from (code) to (id, code, name) in the included example as it totally changes the purpose of the table. Before the change you can have only one unique code for the table, and after the change number of unique codes is limited by a number of permutations between id and name. code is not unique anymore.

I'm not quite sure how Greenplum works, but fellows at stackoverflow got into the same situation: https://stackoverflow.com/questions/40987460/how-should-i-deal-with-my-unique-constraints-during-my-data-migration-from-postg It looks like database doesn't claims that the schema is not correct, it rather brings your attention to the fact that you are not using Greenplum effectively. Keys with extra constraints SHOULD be copied to each node in the cluster therefore nullifying any benefits of using Greenplum.

From my point of view this table can be made Greenplum-friendly by removing id, leaving code the primary key and limiting code to text or smaller varchar value to optimize index size. Greenplum will use field for distributing data across the nodes.

PS: "I was suspecting Greenplum" is based on the Google search for the error message. It doesn't happen for Postgres, only for Greenplum.

from py-mysql2pgsql.

kworr avatar kworr commented on September 2, 2024

Probably I'm still missing something. This example gives me no errors for Percona 5.7.16 / Postrgesql 10.2. What's your database versions? Python version?

from py-mysql2pgsql.

senique avatar senique commented on September 2, 2024

Error case: MySQL 5.7.20-log /PostgreSQL 8.2.15 (Greenplum Database 4.3.7.1 build 1)

Awesome, due to your reply, I test this for MySQL 5.7.20-log /PostgreSQL 8.2, it works.
Your suspect is exactly right.

from py-mysql2pgsql.

senique avatar senique commented on September 2, 2024

Thank u for ur reply.

from py-mysql2pgsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.