[TYPO3] problem with POSTGRE bytea+bigint

Tomas Majer tomasmajer at gmail.com
Sun Jun 3 15:08:00 CEST 2007


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.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 


More information about the TYPO3-english mailing list