John Summerfield wrote:
Jeff Frost wrote:
On Tue, 23 Jan 2007, Josh Williams wrote:
From: Jeff Frost <[EMAIL PROTECTED]>
On Mon, 22 Jan 2007, Richard Ray wrote:
...
That's definitely part of it. I'm assuming the above is an abridged
example and the OP is doing something dynamic with the q
Jeff Frost wrote:
On Tue, 23 Jan 2007, Josh Williams wrote:
From: Jeff Frost <[EMAIL PROTECTED]>
On Mon, 22 Jan 2007, Richard Ray wrote:
...
That's definitely part of it. I'm assuming the above is an abridged
example and the OP is doing something dynamic with the query. The
real trouble
From: Jeff Frost <[EMAIL PROTECTED]>
> On Mon, 22 Jan 2007, Richard Ray wrote:
...
> > #!/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
On Tue, 23 Jan 2007, Josh Williams wrote:
From: Jeff Frost <[EMAIL PROTECTED]>
On Mon, 22 Jan 2007, Richard Ray wrote:
...
That's definitely part of it. I'm assuming the above is an abridged example
and the OP is doing something dynamic with the query. The real trouble is
Bash likes to ex
On Mon, 22 Jan 2007, Richard Ray wrote:
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 m
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
So why are you avoiding "SELECT * FROM t1;" ?
You'd probably also be happier using information_schema to get the column
names.
On Mon, 22 Jan 2007, Richard Ray wrote:
All attributes of t1
Where (select attname from pg_attribute where attrelid = (select relfilenode
from pg_class where relnam
All attributes of t1
Where (select attname from pg_attribute where attrelid = (select
relfilenode from pg_class where relname = 't1') and attisdropped = false and attnum > 0)
is a substitute for *
On Mon, 22 Jan 2007, Jeff Frost wrote:
Perhaps I should have asked this earlier. What informatio
Perhaps I should have asked this earlier. What information are you trying to
extract?
On Mon, 22 Jan 2007, Richard Ray wrote:
This is not exactly what I need
I want to return the data in t1
On Mon, 22 Jan 2007, Jeff Frost wrote:
I think this is what you're looking for Richard:
SELECT attn
This is not exactly what I need
I want to return the data in t1
On Mon, 22 Jan 2007, Jeff Frost wrote:
I think this is what you're looking for Richard:
SELECT attname FROM pg_attribute pa, pg_class pc
WHERE pc.relname = 't1'
AND pa.attrelid = pc.relfilenode
AND pa.attisdropped IS FALSE
I think this is what you're looking for Richard:
SELECT attname FROM pg_attribute pa, pg_class pc
WHERE pc.relname = 't1'
AND pa.attrelid = pc.relfilenode
AND pa.attisdropped IS FALSE
AND pa.attnum > 0;
Let me know if it doesn't do what you intended.
On Mon, 22 Jan 2007, Richard R
This may be a simple but can I create a query such as
select (select attname from pg_attribute where attrelid = (select
relfilenode from pg_class where relname = 't1') and attisdropped =
false and attnum > 0) from t1;
I get
ERROR: more than one row returned by a subquery used as an expressio
12 matches
Mail list logo