pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Ray <rray@mstc.state.ms.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to query by column names
Date: Mon, 22 Jan 2007 19:25:22 -0600 (CST)
Message-ID: <Pine.LNX.4.64.0701221914400.8787@rray.drdc.mstc.ms.gov> (raw)
In-Reply-To: <Pine.LNX.4.64.0701221636130.5992@discord.home.frostconsultingllc.com>
References: <Pine.LNX.4.64.0701221612220.10491@rray.drdc.mstc.ms.gov>
	<Pine.LNX.4.64.0701221528250.5992@discord.home.frostconsultingllc.com>
	<Pine.LNX.4.64.0701221756520.8787@rray.drdc.mstc.ms.gov>
	<Pine.LNX.4.64.0701221619590.5992@discord.home.frostconsultingllc.com>
	<Pine.LNX.4.64.0701221827420.8787@rray.drdc.mstc.ms.gov>
	<Pine.LNX.4.64.0701221636130.5992@discord.home.frostconsultingllc.com>

On Mon, 22 Jan 2007, Jeff Frost wrote:

> So why are you avoiding "SELECT * FROM t1;" ?
>
I was affeared that if I brought my total ignorance to light I would be 
band from the list but here goes.
I work in UNIX/Linux environments.
It's my habit to record my scripts.
A simple example:

#!/bin/bash
CMD="psql -d test \"select * from t1\""
echo $CMD >> my_log
eval $CMD |
while read x; do
   do_something_with_x
done

In this example * expands to all files in the current working directory.
I was attempting to get around this by enumerating the table attributes.



view thread (12+ messages)  latest in thread

Message-ID: <Pine.LNX.4.64.0701221914400.8787@rray.drdc.mstc.ms.gov>
Permalink:  ../Pine.LNX.4.64.0701221914400.8787@rray.drdc.mstc.ms.gov/
Also on:    postgresql.org/message-id/Pine.LNX.4.64.0701221914400.8787@rray.drdc.mstc.ms.gov

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rray@mstc.state.ms.us, jeff@frostconsultingllc.com
  Subject: Re: How to query by column names
  In-Reply-To: <Pine.LNX.4.64.0701221914400.8787@rray.drdc.mstc.ms.gov>

* 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