Ascii Elephant for text based protocols

Started by Charles Clavadetscheralmost 10 years ago21 messagesgeneral
Jump to latest
#1Charles Clavadetscher
clavadetscher@swisspug.org

Hello

We have a long week-end this days and so I tried to create an elephant
using ASCII characters that could be used for mail signatures or
wherever you prefer not to use a graphical interface. I tried to find
something ready on the internet but was unable to spot anything useful
and small enough for this purpose.

You can see the result below, enriched with this year's anniversary
information. Now, since I am not really a gifted designer I was
wondering if somebody has any ideas on how to improve the result.

If the community finds the draft ok and the idea meaningful, it could
even be added to the list of available logos?

Enjoy and thanks for any feedback.
Charles

----------------------------
Swiss PostgreSQL Users Group
c/o Charles Clavadetscher
Motorenstrasse 18
CH - 8005 Zürich

http://www.swisspug.org

+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) / |
| \ /\_/ \)_/ |
| \/ //| |\\ |
| v | | v |
| \__/ |
| |
| PostgreSQL 1996-2016 |
| 20 Years of success |
+------------------------+

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Peter J. Holzer
hjp-pgsql@hjp.at
In reply to: Charles Clavadetscher (#1)
Re: Ascii Elephant for text based protocols

On 2016-05-15 14:02:56 +0200, Charles Clavadetscher wrote:

+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) / |
| \ /\_/ \)_/ |
| \/ //| |\\ |
| v | | v |
| \__/ |
| |
| PostgreSQL 1996-2016 |
| 20 Years of success |
+------------------------+

Nice.

hp

--
_ | Peter J. Holzer | I want to forget all about both belts and
|_|_) | | suspenders; instead, I want to buy pants
| | | hjp@hjp.at | that actually fit.
__/ | http://www.hjp.at/ | -- http://noncombatant.org/

#3Michael Paquier
michael@paquier.xyz
In reply to: Charles Clavadetscher (#1)
Re: Ascii Elephant for text based protocols

On Sun, May 15, 2016 at 9:02 PM, Charles Clavadetscher
<clavadetscher@swisspug.org> wrote:

If the community finds the draft ok and the idea meaningful, it could even
be added to the list of available logos?

FWIW, I am a fan of ASCII art.

+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) / |
| \ /\_/ \)_/ |
| \/ //| |\\ |
| v | | v |
| \__/ |
| |
| PostgreSQL 1996-2016 |
| 20 Years of success |
+------------------------+

Does that translate into something not that complicated when written in SQL?
--
Michael

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4dandl
david@andl.org
In reply to: Peter J. Holzer (#2)
Re: Ascii Elephant for text based protocols

I agree, but I'm hoping someone with design skills (not me!) will step in to
tweak it somewhat.

Comparing it side by side with the one on the web site
* the right ear lobe is too low
* the tusks point wrong
* the trunk is (how shall I put this?) somewhat phallic.

A worthy goal, not quite there yet.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org

-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
owner@postgresql.org] On Behalf Of Peter J. Holzer
Sent: Monday, 16 May 2016 9:11 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Ascii Elephant for text based protocols

On 2016-05-15 14:02:56 +0200, Charles Clavadetscher wrote:

+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) / |
| \ /\_/ \)_/ |
| \/ //| |\\ |
| v | | v |
| \__/ |
| |
| PostgreSQL 1996-2016 |
| 20 Years of success |
+------------------------+

Nice.

hp

--
_ | Peter J. Holzer | I want to forget all about both belts and
|_|_) | | suspenders; instead, I want to buy pants
| | | hjp@hjp.at | that actually fit.
__/ | http://www.hjp.at/ | -- http://noncombatant.org/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5Charles Clavadetscher
clavadetscher@swisspug.org
In reply to: dandl (#4)
Re: Ascii Elephant for text based protocols

Hello

On 05/16/2016 02:51 AM, dandl wrote:

I agree, but I'm hoping someone with design skills (not me!) will step in to
tweak it somewhat.

Comparing it side by side with the one on the web site
* the right ear lobe is too low
* the tusks point wrong

Well. It's ASCII and there are some limitations. Here a second version,
trying to address your two points.

New:
____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
| |
\__/
Old:
____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) /
\ /\_/ \)_/
\/ //| |\\
v | | v
\__/

* the trunk is (how shall I put this?) somewhat phallic.

Mmh... This could apply to any elephant picture. I don't think that this
needs a change, but let's see if there are more feedbacks.

Thx&Bye
Charles

A worthy goal, not quite there yet.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org

-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
owner@postgresql.org] On Behalf Of Peter J. Holzer
Sent: Monday, 16 May 2016 9:11 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Ascii Elephant for text based protocols

On 2016-05-15 14:02:56 +0200, Charles Clavadetscher wrote:

+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) / |
| \ /\_/ \)_/ |
| \/ //| |\\ |
| v | | v |
| \__/ |
| |
| PostgreSQL 1996-2016 |
| 20 Years of success |
+------------------------+

Nice.

hp

--
_ | Peter J. Holzer | I want to forget all about both belts and
|_|_) | | suspenders; instead, I want to buy pants
| | | hjp@hjp.at | that actually fit.
__/ | http://www.hjp.at/ | -- http://noncombatant.org/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Charles Clavadetscher (#5)
Re: Ascii Elephant for text based protocols

Charles Clavadetscher <clavadetscher@swisspug.org> writes:

On 05/16/2016 02:51 AM, dandl wrote:

* the trunk is (how shall I put this?) somewhat phallic.

Mmh... This could apply to any elephant picture. I don't think that this
needs a change, but let's see if there are more feedbacks.

I'd say the problem is at the end: elephant trunks don't curve that
direction. Instead of

| v | | v |
| \__/ |

maybe

| v | | v |
| |__| |

or even

| v | | v |
| |/\| |

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#7Charles Clavadetscher
clavadetscher@swisspug.org
In reply to: Tom Lane (#6)
Re: Ascii Elephant for text based protocols

Hello Tom

Thanks for your feedback.

On 05/16/2016 05:31 AM, Tom Lane wrote:

Charles Clavadetscher <clavadetscher@swisspug.org> writes:

On 05/16/2016 02:51 AM, dandl wrote:

* the trunk is (how shall I put this?) somewhat phallic.

Mmh... This could apply to any elephant picture. I don't think that this
needs a change, but let's see if there are more feedbacks.

I'd say the problem is at the end: elephant trunks don't curve that
direction.

True. I let myself lead more by the original picture than by zoology.

Instead of

| v | | v |
| \__/ |

maybe

| v | | v |
| |__| |

or even

| v | | v |
| |/\| |

The second variant seems better. Now it looks like this.

____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
| |
|/\|

Have a good day.
Charles

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#8Melvin Davidson
melvin6925@gmail.com
In reply to: Charles Clavadetscher (#7)
Re: Ascii Elephant for text based protocols

On Sun, May 15, 2016 at 11:47 PM, Charles Clavadetscher <
clavadetscher@swisspug.org> wrote:

Hello Tom

Thanks for your feedback.

On 05/16/2016 05:31 AM, Tom Lane wrote:

Charles Clavadetscher <clavadetscher@swisspug.org> writes:

On 05/16/2016 02:51 AM, dandl wrote:

* the trunk is (how shall I put this?) somewhat phallic.

Mmh... This could apply to any elephant picture. I don't think that this

needs a change, but let's see if there are more feedbacks.

I'd say the problem is at the end: elephant trunks don't curve that
direction.

True. I let myself lead more by the original picture than by zoology.

Instead of

| v | | v |

| \__/ |

maybe

| v | | v |

| |__| |

or even

| v | | v |

| |/\| |

The second variant seems better. Now it looks like this.

____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
| |
|/\|

Have a good day.
Charles

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

To all, thanks for the concept. The following based on original design
submission, might help in tweaking:

CREATE TABLE elephant
(row_num integer NOT NULL,
row_dat varchar(30) NOT NULL,
CONSTRAINT elephant_pk PRIMARY KEY (row_num)
);

INSERT INTO elephant
(row_num, row_dat)
VALUES
( 1,'+------------------------+'),
( 2,'| ____ ______ ___ |'),
( 3,'| / )/ \/ \ |'),
( 4,'| ( / __ _\ ) |'),
( 5,'| \ (/ o) ( o) ) |'),
( 6,'| \_ (_ ) \ ) / |'),
( 7,'| \ /\_/ \)_/ |'),
( 8,'| \/ //| |\\ |'),
( 9,'| v | | v |'),
(10,'| \__/ |'),
(11,'| |'),
(12,'| PostgreSQL 1996-2016 |'),
(13,'| 20 Years of success |'),
(14,'+------------------------+');

SELECT row_dat FROM elephant ORDER BY row_num;

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

#9Charles Clavadetscher
clavadetscher@swisspug.org
In reply to: Melvin Davidson (#8)
Re: Ascii Elephant for text based protocols

Hello Melvin

Thank you for your code.

With the current design (not yet necessarily the final one):

CREATE TABLE elephant
(row_num integer NOT NULL,
row_dat varchar(30) NOT NULL,
CONSTRAINT elephant_pk PRIMARY KEY (row_num)
);

INSERT INTO elephant
(row_num, row_dat)
VALUES
( 1,'+------------------------+'),
( 2,'| ____ ______ ___ |'),
( 3,'| / )/ \/ \ |'),
( 4,'| ( / __ _\ ) |'),
( 5,'| \ (/ o) ( o) ) |'),
( 6,'| \_ (_ ) \ ) _/ |'),
( 7,'| \ /\_/ \)/ |'),
( 8,'| \/ <//| |\\> |'),
( 9,'| | | |'),
(10,'| |/\| |'),
(11,'| |'),
(12,'| PostgreSQL 1996-2016 |'),
(13,'| 20 Years of success |'),
(14,'+------------------------+');

SELECT row_dat FROM elephant ORDER BY row_num;

Bye
Charles

On 05/16/2016 05:56 AM, Melvin Davidson wrote:

To all, thanks for the concept. The following based on original design
submission, might help in tweaking:

CREATE TABLE elephant
(row_num integer NOT NULL,
row_dat varchar(30) NOT NULL,
CONSTRAINT elephant_pk PRIMARY KEY (row_num)
);

INSERT INTO elephant
(row_num, row_dat)
VALUES
( 1,'+------------------------+'),
( 2,'| ____ ______ ___ |'),
( 3,'| / )/ \/ \ |'),
( 4,'| ( / __ _\ ) |'),
( 5,'| \ (/ o) ( o) ) |'),
( 6,'| \_ (_ ) \ ) / |'),
( 7,'| \ /\_/ \)_/ |'),
( 8,'| \/ //| |\\ |'),
( 9,'| v | | v |'),
(10,'| \__/ |'),
(11,'| |'),
(12,'| PostgreSQL 1996-2016 |'),
(13,'| 20 Years of success |'),
(14,'+------------------------+');

SELECT row_dat FROM elephant ORDER BY row_num;

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

--
Swiss PostgreSQL Users Group
c/o Charles Clavadetscher
Motorenstrasse 18
CH - 8005 Zürich

http://www.swisspug.org

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#10Charles Clavadetscher
clavadetscher@swisspug.org
In reply to: Charles Clavadetscher (#9)
Re: Ascii Elephant for text based protocols

I think I found a better representation for the end of the trunk:

+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) _/ |
| \ /\_/ \)/ |
| \/ <//| |\\> |
| | | |
| |_/ |
| |
| PostgreSQL 1996-2016 |
| 20 years of success |
+------------------------+

And in Melvin's SQL:

CREATE TABLE elephant
(row_num integer NOT NULL,
row_dat varchar(30) NOT NULL,
CONSTRAINT elephant_pk PRIMARY KEY (row_num)
);

INSERT INTO elephant
(row_num, row_dat)
VALUES
( 1,'+------------------------+'),
( 2,'| ____ ______ ___ |'),
( 3,'| / )/ \/ \ |'),
( 4,'| ( / __ _\ ) |'),
( 5,'| \ (/ o) ( o) ) |'),
( 6,'| \_ (_ ) \ ) _/ |'),
( 7,'| \ /\_/ \)/ |'),
( 8,'| \/ <//| |\\> |'),
( 9,'| | | |'),
(10,'| |_/ |'),
(11,'| |'),
(12,'| PostgreSQL 1996-2016 |'),
(13,'| 20 Years of success |'),
(14,'+------------------------+');

SELECT row_dat FROM elephant ORDER BY row_num;

Bye
Charles

Annex: Versions

Original:

____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) /
\ /\_/ \)_/
\/ //| |\\
v | | v
\__/

V2 (feedback David Bennett):

____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/ <--
\ /\_/ \)/ <--
\/ <//| |\\> <--
| |
\__/

V3 (feedback Tom Lane):
____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
| |
|/\| <--
Or
____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
| |
|__| <--

V4 (myself)

____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
| |
|_/ <--

--
Swiss PostgreSQL Users Group
c/o Charles Clavadetscher
Motorenstrasse 18
CH - 8005 Zürich

http://www.swisspug.org

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#11Charles Clavadetscher
clavadetscher@swisspug.org
In reply to: Charles Clavadetscher (#10)
Re: Ascii Elephant for text based protocols - Final

Hi all

OK. I must come to an end with this task.

This is what I find a decent final version and I plan to use it in my
SwissPUG signature until the end of the year.

+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) _/ |
| \ /\_/ \)/ |
| \/ <//| |\\> |
| _| | |
| \|_/ |
| |
| PostgreSQL 1996-2016 |
| 20 years of success |
+------------------------+

It suggests that the trunk is bent behind, like while feeding and I
assume that associations with phallic symbols doesn't apply anymore.

Thank you to all that provided feedbacks, suggestions and compliments.

SQL version by Melvin Davidson:

CREATE TABLE elephant
(row_num integer NOT NULL,
row_dat varchar(30) NOT NULL,
CONSTRAINT elephant_pk PRIMARY KEY (row_num)
);

INSERT INTO elephant
(row_num, row_dat)
VALUES
( 1,'+------------------------+'),
( 2,'| ____ ______ ___ |'),
( 3,'| / )/ \/ \ |'),
( 4,'| ( / __ _\ ) |'),
( 5,'| \ (/ o) ( o) ) |'),
( 6,'| \_ (_ ) \ ) _/ |'),
( 7,'| \ /\_/ \)/ |'),
( 8,'| \/ <//| |\\> |'),
( 9,'| _| | |'),
(10,'| \|_/ |'),
(11,'| |'),
(12,'| PostgreSQL 1996-2016 |'),
(13,'| 20 Years of success |'),
(14,'+------------------------+');

SELECT row_dat FROM elephant ORDER BY row_num;

Regards
Charles

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#12Oleg Bartunov
oleg@sai.msu.su
In reply to: Charles Clavadetscher (#11)
Re: Ascii Elephant for text based protocols - Final

On Mon, May 16, 2016 at 2:47 PM, Charles Clavadetscher
<clavadetscher@swisspug.org> wrote:

SELECT row_dat FROM elephant ORDER BY row_num;

Very good ! Thanks !

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#13Karsten Hilbert
Karsten.Hilbert@gmx.net
In reply to: Charles Clavadetscher (#11)
Re: Ascii Elephant for text based protocols - Final

select pg_logo();

seems like a good idea to me :-)

Karsten

SQL version by Melvin Davidson:

CREATE TABLE elephant
(row_num integer NOT NULL,
row_dat varchar(30) NOT NULL,
CONSTRAINT elephant_pk PRIMARY KEY (row_num)
);

INSERT INTO elephant
(row_num, row_dat)
VALUES
( 1,'+------------------------+'),
( 2,'| ____ ______ ___ |'),
( 3,'| / )/ \/ \ |'),
( 4,'| ( / __ _\ ) |'),
( 5,'| \ (/ o) ( o) ) |'),
( 6,'| \_ (_ ) \ ) _/ |'),
( 7,'| \ /\_/ \)/ |'),
( 8,'| \/ <//| |\\> |'),
( 9,'| _| | |'),
(10,'| \|_/ |'),
(11,'| |'),
(12,'| PostgreSQL 1996-2016 |'),
(13,'| 20 Years of success |'),
(14,'+------------------------+');

SELECT row_dat FROM elephant ORDER BY row_num;

--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#14Michael Paquier
michael@paquier.xyz
In reply to: Karsten Hilbert (#13)
Re: Ascii Elephant for text based protocols - Final

On Tue, May 17, 2016 at 5:13 AM, Karsten Hilbert
<Karsten.Hilbert@gmx.net> wrote:

select pg_logo();

seems like a good idea to me :-)

If you propose a patch with a function that returns a setof text, I am
sure it would get some attention. Though I think that you should
remove the mention of the 20th anniversary.
--
Michael

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#15Charles Clavadetscher
clavadetscher@swisspug.org
In reply to: Michael Paquier (#14)
Re: Ascii Elephant for text based protocols - Final

Hello

On 05/16/2016 10:50 PM, Michael Paquier wrote:

On Tue, May 17, 2016 at 5:13 AM, Karsten Hilbert
<Karsten.Hilbert@gmx.net> wrote:

select pg_logo();

seems like a good idea to me :-)

If you propose a patch with a function that returns a setof text, I am
sure it would get some attention. Though I think that you should
remove the mention of the 20th anniversary.

Thank you for the feedbacks.

Good idea. I will write a function. The most basic would be:

CREATE OR REPLACE FUNCTION pg_logo()
RETURNS SETOF TEXT
AS $$
BEGIN
RETURN QUERY SELECT ' ____ ______ ___ '::TEXT;
RETURN QUERY SELECT ' / )/ \/ \ '::TEXT;
RETURN QUERY SELECT '( / __ _\ )'::TEXT;
RETURN QUERY SELECT ' \ (/ o) ( o) )'::TEXT;
RETURN QUERY SELECT ' \_ (_ ) \ ) _/ '::TEXT;
RETURN QUERY SELECT ' \ /\_/ \)/ '::TEXT;
RETURN QUERY SELECT ' \/ <//| |\\> '::TEXT;
RETURN QUERY SELECT ' _| | '::TEXT;
RETURN QUERY SELECT ' \|_/ '::TEXT;
RETURN;
END;
$$ LANGUAGE plpgsql;

charles@charles.[local]=# select pg_logo();
pg_logo
-----------------------
____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ o) ( o) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
_| |
\|_/
(9 rows)

But I'd like to add arguments so that it is possible to add a frame and
a text as TEXT[]. Additional arguments for the text would be the
position (bottom or right) and the alignments (top, bottom, left, right,
center). All arguments should have default values so that calling the
function without arguments delivers the logo as in the above basic function.

A question to the naming. I find pg_logo() also a good name, but is the
prefix pg_* not reserved for system functions? Of course I could use the
name I want, but was wondering if there is a policy or a best practice
in this area.

And what schema would be appropriate? I could also create the function
without defining a schema and let users decide where they want to put it.

An alternative for the name could be logo(), in analogy to version().

Bye
Charles

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#16Karsten Hilbert
Karsten.Hilbert@gmx.net
In reply to: Charles Clavadetscher (#15)
Re: Ascii Elephant for text based protocols - Final

On Tue, May 17, 2016 at 06:58:14AM +0200, Charles Clavadetscher wrote:

A question to the naming. I find pg_logo() also a good name, but is the
prefix pg_* not reserved for system functions? Of course I could use the
name I want, but was wondering if there is a policy or a best practice in
this area.

pg_logo would only be suitable if it got blessing from "higher up".

Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#17Victor Yegorov
vyegorov@gmail.com
In reply to: Charles Clavadetscher (#11)
Re: Ascii Elephant for text based protocols - Final

2016-05-16 14:47 GMT+03:00 Charles Clavadetscher <clavadetscher@swisspug.org

:

SQL version by Melvin Davidson:

CREATE TABLE elephant
(row_num integer NOT NULL,
row_dat varchar(30) NOT NULL,
CONSTRAINT elephant_pk PRIMARY KEY (row_num)
);

INSERT INTO elephant
(row_num, row_dat)
VALUES
( 1,'+------------------------+'),
( 2,'| ____ ______ ___ |'),
( 3,'| / )/ \/ \ |'),
( 4,'| ( / __ _\ ) |'),
( 5,'| \ (/ o) ( o) ) |'),
( 6,'| \_ (_ ) \ ) _/ |'),
( 7,'| \ /\_/ \)/ |'),
( 8,'| \/ <//| |\\> |'),
( 9,'| _| | |'),
(10,'| \|_/ |'),
(11,'| |'),
(12,'| PostgreSQL 1996-2016 |'),
(13,'| 20 Years of success |'),
(14,'+------------------------+');

SELECT row_dat FROM elephant ORDER BY row_num;

I had a bit of fun with this SQL version and came up with this query:

WITH src(s) AS (
VALUES
('729472967293732174412176b12173b17111752171927491b1744171b17411217181417211718141734172b191721191724173b1714171912175b17221b1912174b1412178b121715122a172a1b2317d91a172a17f71b1a1912177')
), str AS (
SELECT string_agg(repeat(translate(substr(s, p, 1), '123456789ab',
'(/>)<+ o_|\'), ('x'||lpad(substr(s, p+1, 1), 8, '0'))::bit(32)::int), '')
line
FROM src, generate_series(1, 182, 2) p
)
SELECT substr(line, p, 21) slon FROM str, generate_series(1, 189, 21) p;

--
Victor Y. Yegorov

#18Bryan Lee Nuse
nuse@uga.edu
In reply to: Victor Yegorov (#17)
Re: Ascii Elephant for text based protocols - Final

On 05/17/2016 08:25 AM, Victor Yegorov wrote:

I had a bit of fun with this SQL version and came up with this query:

WITH src(s) AS (
VALUES
('729472967293732174412176b12173b17111752171927491b1744171b17411217181417211718141734172b191721191724173b1714171912175b17221b1912174b1412178b121715122a172a1b2317d91a172a17f71b1a1912177')
), str AS (
SELECT string_agg(repeat(translate(substr(s, p, 1), '123456789ab',
'(/>)<+ o_|\'), ('x'||lpad(substr(s, p+1, 1), 8, '0'))::bit(32)::int),
'') line
FROM src, generate_series(1, 182, 2) p
)
SELECT substr(line, p, 21) slon FROM str, generate_series(1, 189, 21) p;

I wonder if --under some fonts especially-- that elephant's eyes look a
little... aggressive?
Perhaps the following is too cute, however:

____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ p) ( g) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
_| |
\|_/

--
Postdoctoral Researcher
Georgia Cooperative Fish & Wildlife Research Unit
University of Georgia
Athens, GA 30606-2152

#19Jan de Visser
jan@de-visser.net
In reply to: Bryan Lee Nuse (#18)
Re: Ascii Elephant for text based protocols - Final

On Tuesday, May 17, 2016 9:41:51 AM EDT Bryan Nuse wrote:

On 05/17/2016 08:25 AM, Victor Yegorov wrote:

I had a bit of fun with this SQL version and came up with this query:

WITH src(s) AS (

VALUES

('729472967293732174412176b12173b17111752171927491b1744171b174112171814172
11718141734172b191721191724173b1714171912175b17221b1912174b1412178b1217151
22a172a1b2317d91a172a17f71b1a1912177') ), str AS (

SELECT string_agg(repeat(translate(substr(s, p, 1), '123456789ab',

'(/>)<+ o_|\'), ('x'||lpad(substr(s, p+1, 1), 8, '0'))::bit(32)::int),
'') line

FROM src, generate_series(1, 182, 2) p

)
SELECT substr(line, p, 21) slon FROM str, generate_series(1, 189, 21) p;

I wonder if --under some fonts especially-- that elephant's eyes look a
little... aggressive?
Perhaps the following is too cute, however:

____ ______ ___
/ )/ \/ \
( / __ _\ )
\ (/ p) ( g) )
\_ (_ ) \ ) _/
\ /\_/ \)/
\/ <//| |\\>
_| |
\|_/

Some people have WAY too much time on their hands.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#20Michael Paquier
michael@paquier.xyz
In reply to: Victor Yegorov (#17)
Re: Ascii Elephant for text based protocols - Final

On Tue, May 17, 2016 at 8:25 AM, Victor Yegorov <vyegorov@gmail.com> wrote:

I had a bit of fun with this SQL version and came up with this query:

WITH src(s) AS (
VALUES
('729472967293732174412176b12173b17111752171927491b1744171b17411217181417211718141734172b191721191724173b1714171912175b17221b1912174b1412178b121715122a172a1b2317d91a172a17f71b1a1912177')
), str AS (
SELECT string_agg(repeat(translate(substr(s, p, 1), '123456789ab', '(/>)<+
o_|\'), ('x'||lpad(substr(s, p+1, 1), 8, '0'))::bit(32)::int), '') line
FROM src, generate_series(1, 182, 2) p
)
SELECT substr(line, p, 21) slon FROM str, generate_series(1, 189, 21) p;

You just made my day.
--
Michael

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#21Karsten Hilbert
Karsten.Hilbert@gmx.net
In reply to: Michael Paquier (#20)