-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: "Unable to find TABLE NAME or COLUMNS" #11
Comments
I think it's because of constraints, can you try to delete them from dump file? I talking about constraints like this: |
Thank you for the reply @caiiiycuk. Those constraints are structural to the data model, they must remain to guarantee data consistency. However I gave it a try and commented out those constraints. The result is exactly the same as reported above. |
can you share part of your dump to test? |
Unfortunately not. This is a closed model, my employer owns copyright. I will try to create a SQL file that reproduces this error with different entitties. |
Hi again. Here below is an annonymised minimal example that reproduces this issue. CREATE TYPE product_type AS ENUM (
'Material',
'Digital'
);
CREATE TABLE product (
client_id integer NOT NULL,
order_product integer,
upper_price integer NOT NULL,
lower_price integer NOT NULL,
type product_type NOT NULL,
product_id integer NOT NULL--,
CONSTRAINT product_check CHECK (((lower_price > upper_price) AND (upper_price <= 200))),
CONSTRAINT product_order_product_check CHECK ((order_product > 0)),
CONSTRAINT product_upper_price_check CHECK ((upper_price >= 0))
); |
@ldesousa The problem was in column name 'upper_price', 'lower_price'. pg2sqlite just check if string starts with 'upper' or 'lower' then tries to cut out function 'upper()' or 'lower()'. Now fixed, try version 1.0.1 (available on releases page). However you should take in account that sqlite didn't support enums, most constraints, etc. sqlite is much much simplier then postgresql, even more pg2sqlite.jar is tool for creating read-only dump of database ... |
I would like to convert a Postgres database to SQLite with this tool. I created a dump and removed all schema names as instructed. When I run the programme it returns an exception: "Unable to find TABLE NAME or COLUMNS". Full log below.
Thank you for reading.
The text was updated successfully, but these errors were encountered: