[Zope] ZBabel translation to Postgres
Olaf Zanger
olaf.zanger@soli-con.com
Thu, 04 Jan 2001 10:50:28 +0100
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------519D8152B9745795CA23908C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi there,
i'm using ZPyGreSQL successfully for my database. To keep it simple i
don't want to use MySQL for ZBabel.
ZBabel though uses some MySQL specific syntax which i am unsuccessfully
translating to PostgreSQL syntax:
Description "md5Hash" are the same fore entries with different "lang"
fields. They are used to translate depending on selected language.
SELECT
Phrases.*
FROM
Phrases
LEFT JOIN
Phrases as b
ON
Phrases.md5Hash = b.md5Hash AND Phrases.lang <> b.lang
WHERE
b.md5Hash is NULL AND Phrases.lang=<dtml-sqlvar srcLang type=nb>
What does the whole thing do anyway?
How can you join "Phrases.md5Hash = b.mdf5Hash", while "md5Hash is
NULL"?
What is different in the LEFT JOIN ... ON ... statement to a normal
WHERE clause?
My try for translation to PostgreSQL (which I assume is completely
ignorant):
SELECT
Phrases.*
FROM
Phrases as b
WHERE
Phrases.md5Hash *= b.md5Hash AND Phrases.lang <> b.lang AND
b.md5Hash is NULL AND Phrases.lang=<dtml-sqlvar srcLang type=nb>
Has anybody ported ZBabel already?
Thanks for help
Olaf
--
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:info@soli-con.com
mailto:olaf.zanger@soli-con.com
http://www.soli-con.com
--------------519D8152B9745795CA23908C
Content-Type: text/x-vcard; charset=us-ascii;
name="olaf.zanger.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Visitenkarte für Olaf Zanger
Content-Disposition: attachment;
filename="olaf.zanger.vcf"
begin:vcard
n:Zanger;Olaf Marc
tel;cell:+41-76-572 9782
tel;work:+41-31-332 9782
x-mozilla-html:FALSE
url:www.soli-con.com
org:soli-con Engineering Zanger
adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland
version:2.1
email;internet:olaf.zanger@soli-con.com
title:Dipl.-Ing.
note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A
x-mozilla-cpt:;-32176
fn:Olaf Zanger
end:vcard
--------------519D8152B9745795CA23908C--