PostgreSQL的connectby给出了无效的返回类型错误

时间:2018-01-10 05:34:44

标签: sql postgresql recursive-query table-functions

我试图在PostgreSQL中重新创建以下const menuEls = Array.from(document.querySelectorAll('.mdc-simple-menu')); menuEls.forEach((menuEl) => { // Initialize MDCSimpleMenu on each ".mdc-simple-menu" const menu = new mdc.menu.MDCSimpleMenu(menuEl); // We wrapped menu and toggle into containers for easier selecting the toggles const dropdownToggle = menuEl.parentElement.querySelector('.js--dropdown-toggle'); dropdownToggle.addEventListener('click', () => { menu.open = !menu.open; }); }); Oracle的HR​​模式的SQL。

connect by

在PostgreSQL中,我使用select employee_id, manager_id, lpad(' ',level*2,' ')||first_name name, level from employees start with manager_id = 100 connect by prior employee_id = manager_id; connectby扩展名

tablefunc

我收到以下错误。

SELECT * FROM connectby('employees', 'employee_id', 'manager_id', '100', 0)
AS t(keyid int , parent_keyid int, level int);

0 个答案:

没有答案