Giter Site home page Giter Site logo

Error when updating the foreign key for table \"public\".\"jbid_io_attr\", err: ERROR #22P02 invalid input syntax for type bigint: \"\" about mock-data HOT 4 CLOSED

faisaltheparttimecoder avatar faisaltheparttimecoder commented on June 3, 2024
Error when updating the foreign key for table \"public\".\"jbid_io_attr\", err: ERROR #22P02 invalid input syntax for type bigint: \"\"

from mock-data.

Comments (4)

faisaltheparttimecoder avatar faisaltheparttimecoder commented on June 3, 2024 1

Yup mock-data would not have added any rows on the table jbid_attr_bin_value

 CREATE TABLE public.jbid_attr_bin_value (
    bin_value_id bigint NOT NULL,
    value oid
  );

since it contains a column oid that we don't support. You should have received a warning like this

https://github.com/pivotal-gss/mock-data/blob/master/worker.go#L183

on the screen, that we skipped the table. I believe we should support it since its a postgres inbuilt datatype, will add this to the list

from mock-data.

faisaltheparttimecoder avatar faisaltheparttimecoder commented on June 3, 2024 1

Fixed added support for OID, will be available on the next release

from mock-data.

janpio avatar janpio commented on June 3, 2024

Following through the code, it seems that whichRow is empty here:
https://github.com/pivotal-gss/mock-data/blob/ac23cf13044b2d697a9fa411cc6c18132c6002db/sql.go#L545

whichRow is filled via v.Row:
https://github.com/pivotal-gss/mock-data/blob/ac23cf13044b2d697a9fa411cc6c18132c6002db/constraintsRestore.go#L120-L122

How it should be filled in the function I unfortunately do not understand:
https://github.com/pivotal-gss/mock-data/blob/ac23cf13044b2d697a9fa411cc6c18132c6002db/sql.go#L516-L533

Any pointers?

from mock-data.

janpio avatar janpio commented on June 3, 2024

Indeed:

...
time="2020-03-08 23:52:56" level=debug msg="Table \"public\".\"jbid_attr_bin_value\" skipped, since the column value, had unknown data type oid: unsupported datatypes found: oid" file="worker.go:138"
...
time="2020-03-08 23:53:01" level=debug msg="Table \"public\".\"jbid_creden_bin_value\" skipped, since the column value, had unknown data type oid: unsupported datatypes found: oid" file="worker.go:138"
...

With the many tables, and verbose output, it was super easy to miss.

from mock-data.

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.