Re: New mug design

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: Rob Napier <rob(at)doitonce(dot)net(dot)au>, Thom Brown <thombrown(at)gmail(dot)com>, damien clochard <damien(at)dalibo(dot)info>, Josh Berkus <josh(at)agliodbs(dot)com>, "Andreas 'ads' Scherbaum" <adsmail(at)wars-nicht(dot)de>, pgsql-advocacy(at)postgresql(dot)org
Subject: Re: New mug design
Date: 2009-11-28 22:57:38
Message-ID: 200911282257.nASMvc307050@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

Marc G. Fournier wrote:
> > You mean:
> >
> > BEGIN;
> > CREATE TABLE pg_mug (contents TEXT);
> > INSERT INTO pg_mug VALUES('coffee', 'sugar', 'cream');
> > COMMIT;
> >
> > ?
> >
> > I don't think "water" makes sense unless you are making instant coffee,
> > which I think is atypical.
>
> Ummm ... last I checked, that query will fail with too many fields? :)

Yep, only I could inject a bug into a mug. :-(

The correct query is:

BEGIN;
CREATE TABLE pg_mug (contents TEXT);
INSERT INTO pg_mug VALUES('coffee'), ('sugar'), ('cream');
COMMIT;

That highlights our multi-value INSERT too. :-) With proper wrap it
would be:

BEGIN;
CREATE TABLE pg_mug (contents TEXT);
INSERT INTO pg_mug
VALUES('coffee'), ('sugar'), ('cream');
COMMIT;

You can even add stirring:

BEGIN;
CREATE TABLE pg_mug (contents TEXT);
INSERT INTO pg_mug
VALUES('coffee'), ('sugar'), ('cream');
-- stir
SELECT * FROM pg_mug ORDER BY random();
COMMIT;

FYi, I am just shooting out ideas until someone tells me to stop. ;-)

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Scrappy 2009-11-28 23:25:02 Re: New mug design
Previous Message Bruce Momjian 2009-11-28 22:52:36 Re: New mug design