Who knows this SELECT in PostgreSQL

From: Michael Monnerie <michael(dot)monnerie(at)is(dot)it-management(dot)at>
To: pgsql-admin(at)postgresql(dot)org
Subject: Who knows this SELECT in PostgreSQL
Date: 2009-06-06 15:14:36
Message-ID: 200906061714.36613@zmi.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dear gurus, I'm sure someone knows immediately how to translate this
mysql to postgresql:

SELECT GROUP_CONCAT(dbmail_messageblks.messageblk
ORDER BY dbmail_messageblks.is_header DESC SEPARATOR '')
FROM dbmail_messages
JOIN dbmail_messageblks ON
(dbmail_messages.physmessage_id=dbmail_messageblks.physmessage_id)
WHERE dbmail_messages.message_idnr='${MSG_UID}'
GROUP BY dbmail_messages.message_idnr"

It should simply return the whole message which can be truncated to
pieces into dbmail_messageblks and return it as a single entity. I found
this for mysql and would like to rewrite the shell script to postgresql,
but am stuck at this select.

mfg zmi
--
// Michael Monnerie, Ing.BSc ----- http://it-management.at
// Tel: 0660 / 415 65 31 .network.your.ideas.
// PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4
// Keyserver: wwwkeys.eu.pgp.net Key-ID: 1C1209B4

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Milen A. Radev 2009-06-06 17:59:11 Re: Who knows this SELECT in PostgreSQL
Previous Message Atul Chojar 2009-06-05 21:17:04 Re: How to automatically propagate new/changed database functions from one database to another