Thread: Question

Question

From
David Costa
Date:
Hello!
Just a generic question for advocacy.
Is it possible for someone willing to advocate PostgreSQL usage (like
me ? ;) ) within a specific language (in my case PHP)
to use an email signature promoting PostgreSQL usage/advocacy ?

I write to a number of public mailing list  (PHP developers list etc)
and it could be a good way to attract the interest of PHP developers.

example:
"
Regards,
David Costa, PostgreSQL  Volunteering Advocate     OR is there such a
thing as "Advocacy group"  ?
link to postgresql site http://postgresql.org
$myemail

an elephant ? ;)
   _______.--,
       ~(       {c .`
        |  |__|   ,= |
       /_/_| |_|\_\ J
"

Just wanted to be sure that is possible and doesn't bother anyone.
I do feel that there is a great yet unexploited potential. An email
signature can't change it over night but.. why not ?

Cheers
David Costa


Re: Question

From
"Joshua D. Drake"
Date:
David Costa wrote:
> Hello!
> Just a generic question for advocacy.
> Is it possible for someone willing to advocate PostgreSQL usage (like me
> ? ;) ) within a specific language (in my case PHP)
> to use an email signature promoting PostgreSQL usage/advocacy ?
>
> I write to a number of public mailing list  (PHP developers list etc)
> and it could be a good way to attract the interest of PHP developers.
>

Well to be honest I don't like the elephant... Only because it takes the
signature above 4 lines... Other than promote away IMHO.

J



> example:
> "
> Regards,
> David Costa, PostgreSQL  Volunteering Advocate     OR is there such a
> thing as "Advocacy group"  ?
> link to postgresql site http://postgresql.org
> $myemail
>
> an elephant ? ;)
>   _______.--,
>       ~(       {c .`
>        |  |__|   ,= |
>       /_/_| |_|\_\ J
> "
>
> Just wanted to be sure that is possible and doesn't bother anyone.
> I do feel that there is a great yet unexploited potential. An email
> signature can't change it over night but.. why not ?
>
> Cheers
> David Costa
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL

Attachment

Re: Question

From
David Costa
Date:
On Feb 21, 2004, at 2:05 AM, Joshua D. Drake wrote:

> David Costa wrote:
>> Hello!
>> Just a generic question for advocacy.
>> Is it possible for someone willing to advocate PostgreSQL usage (like
>> me ? ;) ) within a specific language (in my case PHP)
>> to use an email signature promoting PostgreSQL usage/advocacy ?
>> I write to a number of public mailing list  (PHP developers list etc)
>> and it could be a good way to attract the interest of PHP developers.
>
> Well to be honest I don't like the elephant... Only because it takes
> the signature above 4 lines... Other than promote away IMHO.
>
I can kill him ;)

<!-- $Revision: 1.1 $ -->
>
>> example:
>> "
>> Regards,
>> David Costa, PostgreSQL  Volunteering Advocate     OR is there such a
>> thing as "Advocacy group"  ?
>> link to postgresql site http://postgresql.org
>> $myemail
dead elephant  ;) what about a cool one line postgresql query in lieu
of him ? could demonstrate the logic power of postgresql vs mysql and
others
anyone willing to share a nice one ?

>> Just wanted to be sure that is possible and doesn't bother anyone.
>> I do feel that there is a great yet unexploited potential. An email
>> signature can't change it over night but.. why not ?
>> Cheers
>> David Costa
>> ---------------------------(end of
>> broadcast)---------------------------
>> TIP 8: explain analyze is your friend
>
>
> --
> Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
> Postgresql support, programming shared hosting and dedicated hosting.
> +1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
> Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL
>
> *****
> NOTE: An attachment named jd.vcf was deleted from this message because
> it contained a windows executableor other potentially dangerous file
> type.Contact the system administrator for more information.


Re: Question

From
Robert Treat
Date:
Hey David,

we do have an quasi-official advocacy group that consists of Josh Berkus,
Bruce Momjian, and myself.  However there are certainly a large number of
folks outside of that group who do advocacy work so don't let that stop you.
I wouldn't see any issues using a sig like "PostgreSQL Advocate", would that
work?

Robert Treat

On Friday 20 February 2004 19:39, David Costa wrote:
> Hello!
> Just a generic question for advocacy.
> Is it possible for someone willing to advocate PostgreSQL usage (like
> me ? ;) ) within a specific language (in my case PHP)
> to use an email signature promoting PostgreSQL usage/advocacy ?
>
> I write to a number of public mailing list  (PHP developers list etc)
> and it could be a good way to attract the interest of PHP developers.
>
> example:
> "
> Regards,
> David Costa, PostgreSQL  Volunteering Advocate     OR is there such a
> thing as "Advocacy group"  ?
> link to postgresql site http://postgresql.org
> $myemail
>
> an elephant ? ;)
>    _______.--,
>        ~(       {c .`
>
>         |  |__|   ,= |
>
>        /_/_| |_|\_\ J
> "
>
> Just wanted to be sure that is possible and doesn't bother anyone.
> I do feel that there is a great yet unexploited potential. An email
> signature can't change it over night but.. why not ?
>
> Cheers
> David Costa
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

Re: Question

From
Josh Berkus
Date:
David,

> Just a generic question for advocacy.
> Is it possible for someone willing to advocate PostgreSQL usage (like
> me ? ;) ) within a specific language (in my case PHP)
> to use an email signature promoting PostgreSQL usage/advocacy ?

Yes.   In fact, if you take on specific duties requiring regular contact with
the public, you can even get an @postgresql.org e-mail address.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


Re: Question

From
David Costa
Date:
On Feb 21, 2004, at 2:14 AM, Robert Treat wrote:

> Hey David,
>
> we do have an quasi-official advocacy group that consists of Josh
> Berkus,
> Bruce Momjian, and myself.  However there are certainly a large number
> of
> folks outside of that group who do advocacy work so don't let that
> stop you.
> I wouldn't see any issues using a sig like "PostgreSQL Advocate",
> would that
> work?
>

Yes that's a very good idea. Thanks for your hint.
so another beta
>> Regards,
>> David Costa, PostgreSQL  Advocate
>> link to postgresql site http://postgresql.org
>> $myemail
For the last line , anyone has some ideas for a one line postgresql
query to represent our logic power ? :D



Re: Question

From
David Costa
Date:
On Feb 21, 2004, at 2:53 AM, Josh Berkus wrote:

> David,
>
>> Just a generic question for advocacy.
>> Is it possible for someone willing to advocate PostgreSQL usage (like
>> me ? ;) ) within a specific language (in my case PHP)
>> to use an email signature promoting PostgreSQL usage/advocacy ?
>
> Yes.   In fact, if you take on specific duties requiring regular
> contact with
> the public, you can even get an @postgresql.org e-mail address.

Thank you. I think I can concentrate my efforts within the PHP
community. There is a lot to advocate ;)
If you have a one line query idea I might get my signature done by
tomorrow ;)


>
> --
> -Josh Berkus
>  Aglio Database Solutions
>  San Francisco
>


Re: Question

From
"Joshua D. Drake"
Date:
>
> For the last line , anyone has some ideas for a one line postgresql
> query to represent our logic power ? :D

SELECT sum(coalesce((extract(epoch from
time_spent)/(60*60))::numeric(20,2),0) * coalesce(hourly_rate,
0))::numeric(20,2) AS total_cost




>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>      subscribe-nomail command to majordomo@postgresql.org so that your
>      message can get through to the mailing list cleanly


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL

Attachment

Re: Question

From
Chris Travers
Date:
On Sat, 2004-02-21 at 09:13, David Costa wrote:

> dead elephant  ;) what about a cool one line postgresql query in lieu
> of him ? could demonstrate the logic power of postgresql vs mysql and
> others
> anyone willing to share a nice one ?

Hmmm....  Thinking of PostgreSQL vs MySQL vs. Firebird.....

Unfortunately most of my complex queries are 8-10 lines long and use
features such as subselects and UNION statements.  Those will show the
difference between MySQL and PostgreSQL, but should work in
Interbase/Firebird.

I am afraid the request to demonstrate the logic power of PostgreSQL in
one line is sort of like asking for a proof to Fermat's Theorem in one
double-spaced page and normal font size.  If someone can do this, I will
be quite impressed :-P

Maybe a really simple PLPerl function might be a good idea?

Best Wishes,
Chris Travers


Re: Question

From
Robert Treat
Date:
On Saturday 21 February 2004 06:13, Chris Travers wrote:
> On Sat, 2004-02-21 at 09:13, David Costa wrote:
> > dead elephant  ;) what about a cool one line postgresql query in lieu
> > of him ? could demonstrate the logic power of postgresql vs mysql and
> > others
> > anyone willing to share a nice one ?
>
> Hmmm....  Thinking of PostgreSQL vs MySQL vs. Firebird.....
>
> Unfortunately most of my complex queries are 8-10 lines long and use
> features such as subselects and UNION statements.  Those will show the
> difference between MySQL and PostgreSQL, but should work in
> Interbase/Firebird.
>
> I am afraid the request to demonstrate the logic power of PostgreSQL in
> one line is sort of like asking for a proof to Fermat's Theorem in one
> double-spaced page and normal font size.  If someone can do this, I will
> be quite impressed :-P
>
> Maybe a really simple PLPerl function might be a good idea?
>

better might be a plphp function

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

Re: Question

From
Rod Taylor
Date:
On Sat, 2004-02-21 at 06:13, Chris Travers wrote:
> On Sat, 2004-02-21 at 09:13, David Costa wrote:
>
> > dead elephant  ;) what about a cool one line postgresql query in lieu
> > of him ? could demonstrate the logic power of postgresql vs mysql and
> > others
> > anyone willing to share a nice one ?
>
> Hmmm....  Thinking of PostgreSQL vs MySQL vs. Firebird.....
>
> Unfortunately most of my complex queries are 8-10 lines long and use
> features such as subselects and UNION statements.  Those will show the
> difference between MySQL and PostgreSQL, but should work in
> Interbase/Firebird.
>
> I am afraid the request to demonstrate the logic power of PostgreSQL in
> one line is sort of like asking for a proof to Fermat's Theorem in one
> double-spaced page and normal font size.  If someone can do this, I will
> be quite impressed :-P

rbt=# select nspname, sum(relpages) from pg_class join pg_namespace n on
(relnamespace = n.oid) group by nspname, relnamespace having 2 > (SELECT
count(*) from pg_constraint where relnamespace = connamespace);

With some effort you might be able to get the above down to a single
line (shorter column names, etc.).

It takes the sum of pages used by relations in namespaces with a minimum
of 2 constraints.



Re: Question

From
Shridhar Daithankar
Date:
Rod Taylor wrote:


> rbt=# select nspname, sum(relpages) from pg_class join pg_namespace n on
> (relnamespace = n.oid) group by nspname, relnamespace having 2 > (SELECT
> count(*) from pg_constraint where relnamespace = connamespace);
>
> With some effort you might be able to get the above down to a single
> line (shorter column names, etc.).
>
> It takes the sum of pages used by relations in namespaces with a minimum
> of 2 constraints.

I think any query fiddling with metadata is a bad idea for a sig.

I would say overriding function calls in a single query would make great
example. After all O in ORDBMS is for overriding..:-)

How about declaring a contest on general? An event always stirrs up creativity.

  Shridhar

Re: Question

From
David Costa
Date:
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

On Feb 21, 2004, at 5:10 PM, Shridhar Daithankar wrote:

> Rod Taylor wrote:
>
>
>> rbt=# select nspname, sum(relpages) from pg_class join pg_namespace n
>> on
>> (relnamespace = n.oid) group by nspname, relnamespace having 2 >
>> (SELECT
>> count(*) from pg_constraint where relnamespace = connamespace);
>> With some effort you might be able to get the above down to a single
>> line (shorter column names, etc.).
>> It takes the sum of pages used by relations in namespaces with a
>> minimum
>> of 2 constraints.
>
> I think any query fiddling with metadata is a bad idea for a sig.
>
> I would say overriding function calls in a single query would make
> great example. After all O in ORDBMS is for overriding..:-)
>
> How about declaring a contest on general? An event always stirrs up
> creativity.
>
>  Shridhar
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org


Re: Question

From
Joe Conway
Date:
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)

Joe

Re: Question

From
"Joshua D. Drake"
Date:
> > Maybe a really simple PLPerl function might be a good idea?
> >
>
> better might be a plphp function

We have an SPI/SETOF function capable version of plPHP coming in about a
week.

J



>
> Robert Treat
>

--
Co-Founder
Command Prompt, Inc.
The wheel's spinning but the hamster's dead


Re: Question

From
David Costa
Date:
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@localhost/open_source_database';




Re: Question

From
Rod Taylor
Date:
On Sat, 2004-02-21 at 11:10, Shridhar Daithankar wrote:
> Rod Taylor wrote:
>
>
> > rbt=# select nspname, sum(relpages) from pg_class join pg_namespace n on
> > (relnamespace = n.oid) group by nspname, relnamespace having 2 > (SELECT
> > count(*) from pg_constraint where relnamespace = connamespace);
> >
> > With some effort you might be able to get the above down to a single
> > line (shorter column names, etc.).
> >
> > It takes the sum of pages used by relations in namespaces with a minimum
> > of 2 constraints.
>
> I think any query fiddling with metadata is a bad idea for a sig.

Of course. I was simply demonstrating a query class that is complicated
which many databases probably don't support, PostgreSQL didn't until
recently, but is in the spec.

--
Rod Taylor <rbt [at] rbt [dot] ca>

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/signature.asc

Attachment

Re: Question

From
Bruce Momjian
Date:
Chris Travers wrote:
> On Sat, 2004-02-21 at 09:13, David Costa wrote:
>
> > dead elephant  ;) what about a cool one line postgresql query in lieu
> > of him ? could demonstrate the logic power of postgresql vs mysql and
> > others
> > anyone willing to share a nice one ?
>
> Hmmm....  Thinking of PostgreSQL vs MySQL vs. Firebird.....
>
> Unfortunately most of my complex queries are 8-10 lines long and use
> features such as subselects and UNION statements.  Those will show the
> difference between MySQL and PostgreSQL, but should work in
> Interbase/Firebird.
>
> I am afraid the request to demonstrate the logic power of PostgreSQL in
> one line is sort of like asking for a proof to Fermat's Theorem in one
> double-spaced page and normal font size.  If someone can do this, I will
> be quite impressed :-P

How about:

    SELECT * FROM tab ORDER BY random() LIMIT 5

to pull 5 random rows from a table.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073