Re: Ascii Elephant for text based protocols

From: Charles Clavadetscher <clavadetscher(at)swisspug(dot)org>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Ascii Elephant for text based protocols
Date: 2016-05-16 04:36:50
Message-ID: 57394E62.9090406@swisspug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Haiming Zhang 2016-05-16 05:09:35 Fast way to delete big table?
Previous Message Melvin Davidson 2016-05-16 03:56:55 Re: Ascii Elephant for text based protocols