From: | David Costa <geeks(at)dotgeek(dot)org> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>, Postgresql Advocacy <pgsql-advocacy(at)postgresql(dot)org> |
Subject: | Re: Question |
Date: | 2004-02-22 01:32:48 |
Message-ID: | 05D2F0A3-64D7-11D8-A344-000A95EB456A@dotgeek.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-advocacy |
On Feb 21, 2004, at 8:25 PM, Joe Conway wrote:
> David Costa wrote:
>
>> Anyone with something simple like SELECT from bestdatabases where
>> logic_power.....opensource....
>> something not that complicate.
>> Imagine we have a table with a number of relational databases listed.
>> And our query will return postgresql :D
>
> How 'bout this:
>
> regression=# SELECT s.a[p.i[1]] || s.a[p.i[2]] || s.a[p.i[3]] ||
> s.a[p.i[4]] || s.a[p.i[5]] AS "The Best" FROM (SELECT
> ARRAY['gre','S','Post',chr((ascii('X')::bit(32) #
> 9::bit(32))::int),'L']) AS s(a), (SELECT
> string_to_array('3,1,2,4,5',',')::int[]) AS p(i);
> The Best
> ------------
> PostgreSQL
> (1 row)
>
Wow! thanks a lot for your input and to everyone who spend some if his
valuable time on this. Eventually I opted for a simple php connection
string using Pear DB as an abstraction layer, you can see it below.
Thanks again ;)
Regards,
David Costa, PostgreSQL Advocate http://postgresql.org
david at postgresql ddoot org gurugeek att php dot net
$dsn = 'pgsql://world:most_advanced(at)localhost/open_source_database';
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2004-02-23 13:27:47 | PostgreSQL Performance Comparison |
Previous Message | David Costa | 2004-02-22 01:29:50 | Re: News Feed: PHP/Postgresql Advocacy |