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

compatlib_function - ConnectBy supports only an integer input. It does not work when the parent-child relationship is established as a STRING / VARCHAR. #69

Open
bharathwaj1993 opened this issue Mar 18, 2022 · 1 comment · May be fixed by #70

Comments

@bharathwaj1993
Copy link

compatlib_function - ConnectBy supports only an integer input. It does not work when the parent-child relationship is established as a STRING / VARCHAR.

@h-serizawa
Copy link
Contributor

Confirmed connect_by_path accepts only INTEGER values for parent ID and child ID. If it was run with the following data, the error happened.

=> CREATE TABLE company (id VARCHAR, supervisor_id VARCHAR, name VARCHAR(20));
=> INSERT INTO company VALUES ('1', null, 'Patrick');
=> INSERT INTO company VALUES ('2', '1', 'Jim');
=> INSERT INTO company VALUES ('3', '1', 'Sandy');
=> INSERT INTO company VALUES ('4', '3', 'Brian');
=> INSERT INTO company VALUES ('5', '3', 'Otto');
=> COMMIT;

=> SELECT connect_by_path(supervisor_id, id, name, ' >> ') OVER () FROM company;
vsql:connect_by_path.sql:21: ERROR 3457:  Function connect_by_path(varchar, varchar, varchar, unknown) does not exist, or permission is denied for connect_by_path(varchar, varchar, varchar, unknown)
HINT:  No function matches the given name and argument types. You may need to add explicit type casts

I will work on this issue.

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

Successfully merging a pull request may close this issue.

2 participants