pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: avalon@teleweb.at
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] SELECT multiple tables with same fields
Date: Mon, 6 Sep 1999 18:36:36 +0300
Message-ID: <l03130307b3f98f0fffce@[147.233.159.109]> (raw)
In-Reply-To: <37C95508.B50F49BD@AVALON.at>

At 18:43 +0300 on 29/08/1999, Dipl.-Ing. Thomas Schallar wrote:


> But if I add fields, than I have to add
> them to each of the SELECT statements also, that they won't be missed
> off. That's boaring und faulty.

One may argue about that. I was told in the past never to use * except when
"just checking", i.e. when running something ad-hoc in psql. In
applications, it is always recommended to write the names of the fields
explicitly, which makes sure you don't include fields which are not really
needed, and you know exactly what you got back and why you got it.

The minute you use an equijoin, you have one field which is truly
redundant, not just by name, but also in value. I think that writing a
query is something you do once, but many many redundant bytes will be
transmitted as a result of being lazy during the writing of the query.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (4+ messages)

Message-ID: <l03130307b3f98f0fffce@[147.233.159.109]>
Permalink:  ../l03130307b3f98f0fffce@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130307b3f98f0fffce@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: herouth@oumail.openu.ac.il, avalon@teleweb.at
  Subject: Re: [SQL] SELECT multiple tables with same fields
  In-Reply-To: <l03130307b3f98f0fffce@[147.233.159.109]>
  References: <37C95508.B50F49BD@AVALON.at> <l03130307b3f98f0fffce@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox