TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

Die TYPO3 Mailingliste - nicht fragen: lesen!

[TYPO3] problem with POSTGRE bytea+bigint

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 ...


Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-english@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 03.06.2007, 13:38
Tomas Majer
Gast
 
Beiträge: n/a
Standard [TYPO3] problem with POSTGRE bytea+bigint

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #2  
Alt 03.06.2007, 14:18
Ries van Twisk
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] problem with POSTGRE bytea+bigint

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 03.06.2007, 15:08
Tomas Majer
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] problem with POSTGRE bytea+bigint

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an



Alle Zeitangaben in WEZ +1. Es ist jetzt 22:00 Uhr.


Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39