Die TYPO3 Mailingliste - nicht fragen: lesen!
This is a discussion on [TYPO3] problem with POSTGRE bytea+bigint within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; hi i have problem with typo3 and postgre i would like to execute query like this: select * from table1 left ...
|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
hi
i have problem with typo3 and postgre i would like to execute query like this: select * from table1 left join table2 on table2.parent=table1.uid but problem is when typo3 is creating table2, the field 'parent' is bytea and in table1.uid is bigint postgre cannot compare this types -> error: operator does not exist: bytea = bigint then i create my own function and operator function works, but operator is doing something strange it looks like this: CREATE OPERATOR "public".== ( PROCEDURE = "public"."function1", LEFTARG = bytea, RIGHTARG = bigint, COMMUTATOR = "public".=, NEGATOR = "public".!, RESTRICT = "eqsel", JOIN = "eqjoinsel", HASHES); when i execute my query now with ... on table2.parent==table1.uid ... i get result with table1 data and joined table2 data is null is there anybody who can help me? thanks tomaj ![]() _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
Hey TOMAJ,
I have never seen TYPO3 creating a bytea field type, however I also need to admit I stopped TYPO3 creating the tables for me because to often I need to create my own schema's and what typo3 creates is less optimal. Possible is that you let typo3 create the field types, and now you want to make your own join. In the case of the bytea you where (I think) planning to make a n-m relation without using a MM table. In that case there are functions for creating the 'correct' joins using some funky comma-separate field list using LIKE. If that is the case then I would strongly suggest using MM tables since TYPO3 create a non left anchored query to get to it's solution which is slow for larger tables. Ries On Jun 3, 2007, at 6:38 AM, Tomas Majer wrote: > hi > i have problem with typo3 and postgre > i would like to execute query like this: > select * from table1 left join table2 on table2.parent=table1.uid > > but problem is when typo3 is creating table2, the field 'parent' is > bytea and in table1.uid is bigint > postgre cannot compare this types -> error: operator does not > exist: bytea = bigint > > then i create my own function and operator > function works, but operator is doing something strange > it looks like this: > CREATE OPERATOR "public".== ( PROCEDURE = "public"."function1", > LEFTARG = bytea, RIGHTARG = bigint, > COMMUTATOR = "public".=, NEGATOR = "public".!, > RESTRICT = "eqsel", JOIN = "eqjoinsel", > HASHES); > > when i execute my query now with ... on table2.parent==table1.uid ... > i get result with table1 data and joined table2 data is null > > is there anybody who can help me? > > thanks > tomaj ![]() > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english -- Ries van Twisk Freelance Typo3 Developer email: ries (AT) vantwisk (DOT) nl web: http://www.rvantwisk.nl/ skype: callto://r.vantwisk _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
Hi Ries
there is 1:m relation and i think i resolve my problem ;-) everything was ok (function and operator) but there was broken data in one table tomaj Ries van Twisk wrote / napísal(a ![]() > Hey TOMAJ, > > I have never seen TYPO3 creating a bytea field type, > however I also need to admit I stopped TYPO3 > creating the tables for me because to often I need > to create my own schema's and what typo3 creates > is less optimal. > > Possible is that you let typo3 create the field types, > and now you want to make your own join. In the case of the bytea > you where (I think) planning to make a n-m relation without using > a MM table. In that case there are functions for creating the > 'correct' joins using some funky comma-separate field list > using LIKE. If that is the case then I would strongly > suggest using MM tables since TYPO3 create a > non left anchored query to get to it's solution which is slow > for larger tables. > > Ries > > > > > > > > On Jun 3, 2007, at 6:38 AM, Tomas Majer wrote: > >> hi >> i have problem with typo3 and postgre >> i would like to execute query like this: >> select * from table1 left join table2 on table2.parent=table1.uid >> >> but problem is when typo3 is creating table2, the field 'parent' is >> bytea and in table1.uid is bigint >> postgre cannot compare this types -> error: operator does not exist: >> bytea = bigint >> >> then i create my own function and operator >> function works, but operator is doing something strange >> it looks like this: >> CREATE OPERATOR "public".== ( PROCEDURE = "public"."function1", >> LEFTARG = bytea, RIGHTARG = bigint, >> COMMUTATOR = "public".=, NEGATOR = "public".!, >> RESTRICT = "eqsel", JOIN = "eqjoinsel", >> HASHES); >> >> when i execute my query now with ... on table2.parent==table1.uid ... >> i get result with table1 data and joined table2 data is null >> >> is there anybody who can help me? >> >> thanks >> tomaj ![]() >> _______________________________________________ >> TYPO3-english mailing list >> TYPO3-english (AT) lists (DOT) netfielders.de >> http://lists.netfielders.de/cgi-bin/.../typo3-english > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Themen-Optionen | Thema durchsuchen |
| Ansicht | Thema bewerten |
|
|