Warning (2): pg_query() [function.pg-query]: Query failed: ERROR:  set-returning functions are not allowed in CASE
LINE 11:                         fn_categories_connect_by((q.ebs_cate...
                                 ^
HINT:  You might be able to move the set-returning function into a LATERAL FROM item.
QUERY:  

        SELECT  CASE

                WHEN node = 1 THEN

                        (ebs_categories, $2)::tp_categories

                ELSE

                        fn_categories_connect_by((q.ebs_categories).id, $2 + 1)

                END

        FROM    (

                SELECT  ebs_categories, node

                FROM    (

                        SELECT  1 AS node

                        UNION ALL

                        SELECT  2

                        ) nodes,

                        ebs_categories

                WHERE   parent_id = $1

                ORDER BY

                        nazwa_pol asc, node

                ) q;


CONTEXT:  SQL function "fn_categories_connect_by" during startup [ROOTeb2bsalesROOTcakeROOTlibsROOTmodelROOTdatasourcesROOTdboROOTdbo_postgres.php, line 155]
Warning (512): SQL Error: ERROR:  set-returning functions are not allowed in CASE
LINE 11:                         fn_categories_connect_by((q.ebs_cate...
                                 ^
HINT:  You might be able to move the set-returning function into a LATERAL FROM item.
QUERY:  

        SELECT  CASE

                WHEN node = 1 THEN

                        (ebs_categories, $2)::tp_categories

                ELSE

                        fn_categories_connect_by((q.ebs_categories).id, $2 + 1)

                END

        FROM    (

                SELECT  ebs_categories, node

                FROM    (

                        SELECT  1 AS node

                        UNION ALL

                        SELECT  2

                        ) nodes,

                        ebs_categories

                WHERE   parent_id = $1

                ORDER BY

                        nazwa_pol asc, node

                ) q;


CONTEXT:  SQL function "fn_categories_connect_by" during startup [ROOTeb2bsalesROOTcakeROOTlibsROOTmodelROOTdatasourcesROOTdbo_source.php, line 526]

Query: SELECT * FROM ebs_categories_sorted where opublikowana = true;

Warning (2): Cannot modify header information - headers already sent by (output started at /eb2bsales/cake/basics.php:108) [ROOTeb2bsalesROOTcakeROOTlibsROOTcontrollerROOTcomponentsROOTcookie.php, line 363]
Warning (2): pg_query() [function.pg-query]: Query failed: ERROR:  invalid input syntax for type integer: "\x31373134323236313637"
LINE 1: ...ams";a:0:{}}}Auth|a:1:{s:8:"redirect";s:1:"/";}', '\x3137313...
                                                             ^ [ROOTeb2bsalesROOTcakeROOTlibsROOTmodelROOTdatasourcesROOTdboROOTdbo_postgres.php, line 155]
Warning (512): SQL Error: ERROR:  invalid input syntax for type integer: "\x31373134323236313637"
LINE 1: ...ams";a:0:{}}}Auth|a:1:{s:8:"redirect";s:1:"/";}', '\x3137313...
                                                             ^ [ROOTeb2bsalesROOTcakeROOTlibsROOTmodelROOTdatasourcesROOTdbo_source.php, line 526]

Query: INSERT INTO "ebs_cake_sessions" ("data","expires","id") VALUES ('Config|a:3:{s:9:"userAgent";s:32:"85da544a9d892fdd43dde21aea475035";s:4:"time";i:1714226166;s:7:"timeout";i:10;}kamiltest|s:15:"test test test2";Message|a:1:{s:4:"auth";a:3:{s:7:"message";s:26:"System wymaga zalogowania.";s:6:"layout";s:7:"default";s:6:"params";a:0:{}}}Auth|a:1:{s:8:"redirect";s:1:"/";}', '\x31373134323236313637', '8691addf27e01d11c2ab98867891274b')

Warning (2): Cannot modify header information - headers already sent by (output started at /eb2bsales/cake/basics.php:108) [ROOTeb2bsalesROOTcakeROOTlibsROOTcontrollerROOTcontroller.php, line 646]
(default) 37 queries took 346 ms
NrQueryErrorAffectedNum. rowsTook (ms)
1SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = 'public';676713
2SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_aros' AND table_schema = 'public' ORDER BY position775
3SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_acos' AND table_schema = 'public' ORDER BY position774
4SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_aros_acos' AND table_schema = 'public' ORDER BY position773
5SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_discount_groups' AND table_schema = 'public' ORDER BY position995
6SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_companies' AND table_schema = 'public' ORDER BY position41419
7SELECT "ebs_cake_sessions"."data" FROM "ebs_cake_sessions" WHERE "ebs_cake_sessions"."id" = '8691addf27e01d11c2ab98867891274b'001
8select id, value_pol from ebs_dictionary_items where dictionary_id = 6441
9SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_users' AND table_schema = 'public' ORDER BY position20209
10SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_user_limits' AND table_schema = 'public' ORDER BY position882
11SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_orders' AND table_schema = 'public' ORDER BY position21213
12SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_palety_orders' AND table_schema = 'public' ORDER BY position442
13SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_invoices' AND table_schema = 'public' ORDER BY position48483
14SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_invoice_items' AND table_schema = 'public' ORDER BY position23233
15SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_payments' AND table_schema = 'public' ORDER BY position665
16SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_order_items' AND table_schema = 'public' ORDER BY position23239
17SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_products' AND table_schema = 'public' ORDER BY position31317
18SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_vendors' AND table_schema = 'public' ORDER BY position10105
19SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_number_categories' AND table_schema = 'public' ORDER BY position335
20SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_products_categories' AND table_schema = 'public' ORDER BY position335
21SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_categories' AND table_schema = 'public' ORDER BY position11116
22SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_products_attributes' AND table_schema = 'public' ORDER BY position775
23SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_attributes' AND table_schema = 'public' ORDER BY position996
24SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_cart_items' AND table_schema = 'public' ORDER BY position17176
25SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_packages' AND table_schema = 'public' ORDER BY position12125
26SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_invoices_packages' AND table_schema = 'public' ORDER BY position335
27SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_dictionary_items' AND table_schema = 'public' ORDER BY position15157
28SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_dictionaries' AND table_schema = 'public' ORDER BY position996
29SELECT * FROM ebs_categories_sorted where opublikowana = true;ERROR: set-returning functions are not allowed in CASE LINE 11: fn_categories_connect_by((q.ebs_cate... ^ HINT: You might be able to move the set-returning function into a LATERAL FROM item. QUERY: SELECT CASE WHEN node = 1 THEN (ebs_categories, $2)::tp_categories ELSE fn_categories_connect_by((q.ebs_categories).id, $2 + 1) END FROM ( SELECT ebs_categories, node FROM ( SELECT 1 AS node UNION ALL SELECT 2 ) nodes, ebs_categories WHERE parent_id = $1 ORDER BY nazwa_pol asc, node ) q; CONTEXT: SQL function "fn_categories_connect_by" during startup35
30SELECT "DictionaryItem"."id" AS "DictionaryItem__id", "DictionaryItem"."dictionary_id" AS "DictionaryItem__dictionary_id", "DictionaryItem"."name_pol" AS "DictionaryItem__name_pol", "DictionaryItem"."value_pol" AS "DictionaryItem__value_pol", "DictionaryItem"."params" AS "DictionaryItem__params", "DictionaryItem"."opis_pol" AS "DictionaryItem__opis_pol", "Dictionary"."dictionary_name_pol" AS "Dictionary__dictionary_name_pol" FROM "ebs_dictionary_items" AS "DictionaryItem" LEFT JOIN "ebs_dictionaries" AS "Dictionary" ON ("DictionaryItem"."dictionary_id" = "Dictionary"."id") WHERE dictionary_id = 6 OR dictionary_id = 5 12121
31SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_logistic_discounts' AND table_schema = 'public' ORDER BY position445
32SELECT * FROM ebs_client_discounts(0, true, true, false);00148
33SELECT "LogisticDiscount"."id" AS "LogisticDiscount__id", "LogisticDiscount"."typ" AS "LogisticDiscount__typ", "LogisticDiscount"."rabat" AS "LogisticDiscount__rabat", "LogisticDiscount"."ilosc_od" AS "LogisticDiscount__ilosc_od" FROM "ebs_logistic_discounts" AS "LogisticDiscount" WHERE 1 = 1 550
34SELECT DISTINCT column_name AS name, data_type AS type, is_nullable AS null, column_default AS default, ordinal_position AS position, character_maximum_length AS char_length, character_octet_length AS oct_length FROM information_schema.columns WHERE table_name = 'ebs_log_events' AND table_schema = 'public' ORDER BY position773
35SELECT "CartItem"."id" AS "CartItem__id", "CartItem"."session_id" AS "CartItem__session_id", "CartItem"."user_id" AS "CartItem__user_id", "CartItem"."product_id" AS "CartItem__product_id", "CartItem"."ilosc" AS "CartItem__ilosc", "CartItem"."cena" AS "CartItem__cena", "CartItem"."rabat_podstawowy" AS "CartItem__rabat_podstawowy", "CartItem"."rabat_skladowy" AS "CartItem__rabat_skladowy", "CartItem"."rabat_logistyczny" AS "CartItem__rabat_logistyczny", "CartItem"."rabat_promocyjny" AS "CartItem__rabat_promocyjny", "CartItem"."cena_promocyjna" AS "CartItem__cena_promocyjna", "CartItem"."promotion_id" AS "CartItem__promotion_id", "CartItem"."skladowy_tekst" AS "CartItem__skladowy_tekst", "CartItem"."tryb_liczenia_ceny" AS "CartItem__tryb_liczenia_ceny", "CartItem"."rabat_gotowkowy" AS "CartItem__rabat_gotowkowy", "CartItem"."rabat_odbior" AS "CartItem__rabat_odbior", "CartItem"."cena_zero" AS "CartItem__cena_zero", "User"."id" AS "User__id", "User"."company_id" AS "User__company_id", "User"."master_company_id" AS "User__master_company_id", "User"."akceptuje_user_id" AS "User__akceptuje_user_id", "User"."username" AS "User__username", "User"."password" AS "User__password", "User"."imie" AS "User__imie", "User"."nazwisko" AS "User__nazwisko", "User"."email" AS "User__email", "User"."status" AS "User__status", "User"."limit_zamowienia" AS "User__limit_zamowienia", "User"."limit_dzienny" AS "User__limit_dzienny", "User"."limit_miesieczny" AS "User__limit_miesieczny", "User"."limit_zamowienia_do_akceptacji" AS "User__limit_zamowienia_do_akceptacji", "User"."limit_dzienny_do_akceptacji" AS "User__limit_dzienny_do_akceptacji", "User"."limit_miesieczny_do_akceptacji" AS "User__limit_miesieczny_do_akceptacji", "User"."zablokowany" AS "User__zablokowany", "User"."tel1" AS "User__tel1", "User"."tel2" AS "User__tel2", "User"."zastepca_id" AS "User__zastepca_id", "Product"."id" AS "Product__id", "Product"."vendor_id" AS "Product__vendor_id", "Product"."nazwa_pol" AS "Product__nazwa_pol", "Product"."opis_pol" AS "Product__opis_pol", "Product"."symbol" AS "Product__symbol", "Product"."symbol2" AS "Product__symbol2", "Product"."obrazek" AS "Product__obrazek", "Product"."opublikowany" AS "Product__opublikowany", "Product"."cena" AS "Product__cena", "Product"."kod" AS "Product__kod", "Product"."vat" AS "Product__vat", "Product"."pjm_pol" AS "Product__pjm_pol", "Product"."stock" AS "Product__stock", "Product"."waga_pjm" AS "Product__waga_pjm", "Product"."jm_na_palecie" AS "Product__jm_na_palecie", "Product"."symfonia_id" AS "Product__symfonia_id", "Product"."stock_obcy" AS "Product__stock_obcy", "Product"."asortyment" AS "Product__asortyment", "Product"."jm_w_kartonie" AS "Product__jm_w_kartonie", "Product"."data_ostatniej_aktualizacji" AS "Product__data_ostatniej_aktualizacji", "Product"."znacznik_symfonia" AS "Product__znacznik_symfonia", "Product"."cena_euro" AS "Product__cena_euro" FROM "ebs_cart_items" AS "CartItem" LEFT JOIN "ebs_users" AS "User" ON ("CartItem"."user_id" = "User"."id") LEFT JOIN "ebs_products" AS "Product" ON ("CartItem"."product_id" = "Product"."id") WHERE "CartItem"."session_id" = '8691addf27e01d11c2ab98867891274b' 001
36SELECT COUNT(id) AS count FROM "ebs_cake_sessions" WHERE "id" = '8691addf27e01d11c2ab98867891274b'110
37INSERT INTO "ebs_cake_sessions" ("data","expires","id") VALUES ('Config|a:3:{s:9:"userAgent";s:32:"85da544a9d892fdd43dde21aea475035";s:4:"time";i:1714226166;s:7:"timeout";i:10;}kamiltest|s:15:"test test test2";Message|a:1:{s:4:"auth";a:3:{s:7:"message";s:26:"System wymaga zalogowania.";s:6:"layout";s:7:"default";s:6:"params";a:0:{}}}Auth|a:1:{s:8:"redirect";s:1:"/";}', '\x31373134323236313637', '8691addf27e01d11c2ab98867891274b')ERROR: invalid input syntax for type integer: "\x31373134323236313637" LINE 1: ...ams";a:0:{}}}Auth|a:1:{s:8:"redirect";s:1:"/";}', '\x3137313... ^8