Skip to content
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

[Bug]: Not able to convert Table for columnar access #135

Closed
shah-manthan9 opened this issue Aug 21, 2023 · 1 comment
Closed

[Bug]: Not able to convert Table for columnar access #135

shah-manthan9 opened this issue Aug 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@shah-manthan9
Copy link

What's wrong?

When I am trying set the access method to columnar I am getting following error.

SQL Error [22P02]: ERROR: invalid input syntax for type boolean: "2"
  Where: PL/pgSQL function columnar.alter_table_set_access_method(text,text) line 57 at IF

Table Definition

CREATE TABLE public.master_country (
	id uuid NOT NULL,
	country_name varchar(100) NOT NULL,
	country_code varchar(5) NOT NULL,
	numeric_code int4 NOT NULL,
	status int4 NOT NULL,
	created_at timestamptz NOT NULL,
	modified_at timestamptz NOT NULL,
	created_by_id uuid NULL,
	modified_by_id uuid NULL,
	latitude varchar(35) NULL,
	longitude varchar(35) NULL,
	CONSTRAINT master_country_country_code_key UNIQUE (country_code),
	CONSTRAINT master_country_country_name_key UNIQUE (country_name),
	CONSTRAINT master_country_pkey PRIMARY KEY (id),
	CONSTRAINT master_country_created_by_id_61f003bf_fk_account_user_id FOREIGN KEY (created_by_id) REFERENCES public.account_user(id) DEFERRABLE INITIALLY DEFERRED,
	CONSTRAINT master_country_modified_by_id_23d8e1a8_fk_account_user_id FOREIGN KEY (modified_by_id) REFERENCES public.account_user(id) DEFERRABLE INITIALLY DEFERRED
);
CREATE INDEX master_country_country_code_60ea7291_like ON public.master_country USING btree (country_code varchar_pattern_ops);
CREATE INDEX master_country_country_name_f78e10e8_like ON public.master_country USING btree (country_name varchar_pattern_ops);
CREATE INDEX master_country_created_by_id_61f003bf ON public.master_country USING btree (created_by_id);
CREATE INDEX master_country_modified_by_id_23d8e1a8 ON public.master_country USING btree (modified_by_id);

Query I am using to change access method

SELECT columnar.alter_table_set_access_method('master_country', 'columnar');

@shah-manthan9 shah-manthan9 added the bug Something isn't working label Aug 21, 2023
@shah-manthan9 shah-manthan9 changed the title [Bug]: Not able to convert Table to columnar access [Bug]: Not able to convert Table for columnar access Aug 21, 2023
@mkaruza
Copy link
Contributor

mkaruza commented Aug 21, 2023

Hi @shah-manthan9

Thank you for reporting bug, this is going to be fixed in #136. Just for quick information, conversion doesn't work if table has foreign keys or is referenced by other table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants