Skip to content

error when populate using the example #22

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

Closed
josehu-t opened this issue Sep 1, 2021 · 3 comments
Closed

error when populate using the example #22

josehu-t opened this issue Sep 1, 2021 · 3 comments

Comments

@josehu-t
Copy link

josehu-t commented Sep 1, 2021

postgres=# create table vops_lineitem(
postgres(# l_shipdate vops_date not null,
postgres(# l_quantity vops_float4 not null,
postgres(# l_extendedprice vops_float4 not null,
postgres(# l_discount vops_float4 not null,
postgres(# l_tax vops_float4 not null,
postgres(# l_returnflag vops_char not null,
postgres(# l_linestatus vops_char not null
postgres(# );
CREATE TABLE
postgres=# select populate(destination := 'vops_lineitem'::regclass, source := 'lineitem'::regclass);
2021-09-01 15:04:54.658 CST [26612] ERROR: Incompatible type of attribute 6: "char" vs. character
2021-09-01 15:04:54.658 CST [26612] STATEMENT: select populate(destination := 'vops_lineitem'::regclass, source := 'lineitem'::regclass);
ERROR: Incompatible type of attribute 6: "char" vs. character

@josehu-t
Copy link
Author

josehu-t commented Sep 1, 2021

remove two char column to avoid error

@knizhnik
Copy link
Contributor

knizhnik commented Sep 1, 2021

Sorry, are you using master branch?
And did you use definition of lineitem table from the tpch.sql example or you have have created it yourself.
Please notice that type of l_returnflag and l_linestatus columns should be "char", not char(1)
In Postgres "char" and char are different types. First one represent single byte integer.

@josehu-t
Copy link
Author

get it! thanks a lot.

Sorry, are you using master branch?
And did you use definition of lineitem table from the tpch.sql example or you have have created it yourself.
Please notice that type of l_returnflag and l_linestatus columns should be "char", not char(1)
In Postgres "char" and char are different types. First one represent single byte integer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants