On Tue, 1 Aug 2006 15:30:48 -0700
Daniel Joo [EMAIL PROTECTED] wrote:
Is there a way to view the list of all tables from python (or any other
languages for that matter) DB-API? What I'm looking for is a command
similar to the meta-command '\d' that works with the psql client.
The cursor
-- George Young
On Fri, 21 Apr 2006 09:29:33 -0700 (PDT)
Jeff Frost [EMAIL PROTECTED] wrote:
Is there a reasonable way to extract a list of all tables which contain a
specific column name from the system views on 8.1?
For instance, I might want to enumerate all tables with a column named
. No
updates are ever made to steps.opset and steps.step, or to
opset_steps.(opset,step)
[though updates are often made to *other* fields of steps].
-- George Young
--
Are the gods not just? Oh no, child.
What would become of us if they were? (CSL)
---(end of broadcast
On Thu, 23 Mar 2006 11:44:32 -0800
Don Maier [EMAIL PROTECTED] threw this fish to the penguins:
Is it possible to construct an array from an appropriate select
expression that generates a result set of unknown cardinality?
To focus on the simple case: Is it possible to construct a one-
the object:
newschm3=# \d+ fffg
Table public.fffg
Column | Type | Modifiers | Description
+-+---+-
t | text| |
i | integer | |
This seems a bit like a bug to me...
-- George Young
stage=# comment on table
* the sequence.
insert into foo select * from foo_tmp;
drop table foo_tmp;
If there's any chance of concurrent update/insert/deletes to foo, you
might should wrap this in a (begin; stuff; commit) transaction.
-- George Young
On Tue, 14 Mar 2006 09:19:49 +0200
Aarni Ruuhimäki [EMAIL PROTECTED] threw
Try the PGDATESTYLE environment variable.
Works in 7.4 and 8.1, though it is claimed to be deprecated.
-- George Young
On Wed, 01 Mar 2006 12:32:26 -0500
Mark Fenbers [EMAIL PROTECTED] threw this fish to the penguins:
I want to get Pg (v7.4.7) to output a date field in a different format
On 9 Feb 2006 08:22:59 -0800
BigSmoke [EMAIL PROTECTED] threw this fish to the penguins:
If my tables have one or more UNIQUE constraints/indices, I still add a
id SERIAL PRIMARY KEY field to most of my tables. This makes
referencing easier and faster. It also improves consistency, which is
plans? Will Edgar Codd haunt my dreams?
-- George Young
--
Are the gods not just? Oh no, child.
What would become of us if they were? (CSL)
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
On Wed, 08 Feb 2006 18:34:22 -0800
Ken Hill [EMAIL PROTECTED] threw this fish to the penguins:
On Wed, 2006-02-08 at 21:04 -0500, george young wrote:
[PostgreSQL 8.1.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1]
I'm designing a completely new schema for my database. A major
, absolutely ALWAYS
qualify a correlation name (table alias). Of course, what I meant
in the original query was:
select s.run_id from s_bake s where s.opset_id not in (select os.opset_id
from old_opset_steps os);
Sigh. Am I missing something here?
-- George Young
--
Are the gods not just? Oh
On Tue, 07 Feb 2006 12:45:53 -0500
Tom Lane [EMAIL PROTECTED] threw this fish to the penguins:
george young gry@ll.mit.edu writes:
This query returns zero rows:
newschm3=# select run_id from s_bake where opset_id not in (select opset_id
from opset_steps);
run_id
(0 rows
mailing list, please point me out to the
correct one.
You question is quite welcome here!
-- George Young
--
Are the gods not just? Oh no, child.
What would become of us if they were? (CSL)
---(end of broadcast)---
TIP 4: Have you searched our list
| {operator,originator}
lcalvet | 622 | {originator}
loomis | 514 | {operator,originator}
pig | 614 | {operator,originator,supervisor}
-- George Young
--
Are the gods not just? Oh no, child.
What would become of us if they were? (CSL)
---(end of broadcast
On Mon, 19 Dec 2005 09:54:49 -0700
Michael Fuhr [EMAIL PROTECTED] threw this fish to the penguins:
On Mon, Dec 19, 2005 at 11:06:12AM -0500, george young wrote:
create table new_tab(name text, id int, permits text[]);
-- I insert one row per name:
insert into new_tab select distinct
for me to package more formally?
-- George Young
CREATE or REPLACE FUNCTION rename_table_and_indexes(old_name text, new_name
text) returns void AS $$
declare
prefix_len integer;
r record;
begin
8.10.5 Searching in Arrays in
http://www.postgresql.org/docs/7.4/interactive/arrays.html
and section 9.17.3 in:
http://www.postgresql.org/docs/7.4/interactive/functions-comparisons.html
-- George Young
--
Are the gods not just? Oh no, child.
What would become of us if they were? (CSL
[PostgreSQL 8.1.0 on i686-pc-linux-gnu]
I would like to suggest that there be a less-than (or greater-than)
operator for the 'tid' type.
I used to use oid's for finding and distinguishing duplicate data.
Now that oid's are not included by default (and I do not quarrel with
that change), I
On Mon, 21 Nov 2005 16:19:28 -0500
Tom Lane [EMAIL PROTECTED] threw this fish to the penguins:
george young gry@ll.mit.edu writes:
update steps set x=x||'X' from steps s where steps.key1=s.key1 and
steps.key2=s.key2 and step.ctids.ctid;
But this fails because there is no less-than
[PostgreSQL 7.4RC2 on i686-pc-linux-gnu](I know, I know... must upgrade soon)
I have a table mytable like:
i | txt
---+---
1 | the
2 | the
3 | rain
4 | in
5 | mainly
6 | spain
7 | stays
8 | mainly
9 | in
I want to update it, adding a ':' to txt so that each txt value is unique.
in text type, not the native type.
Yes, this takes a performance hit for conversion of values, but the
simplicity of schema really wins for me. I suggest you seriously consider
it unless you need blinding performance in all 20,000 applications...
-- George Young
--
Are the gods not just? Oh
vendor to verify that
this is a valid Windows Installer package.
So I tried the analgous file from 8.0.3, with the same results.
What am I doing wrong?
-- George Young
--
Are the gods not just? Oh no, child.
What would become of us if they were? (CSL)
---(end
can I fix this? I must be able to get clean dumps that can be reloaded in
case of a crash.
-- George Young
pig5= select * from pg_class where relname='areas';
relname | relnamespace | reltype | relowner | relam | relfilenode | relpages
| reltuples | reltoastrelid | reltoastidxid | relhasindex
Yes, that worked. Thank you very much!
-- George
On Fri, 14 Oct 2005 12:04:13 -0400
Tom Lane [EMAIL PROTECTED] threw this fish to the penguins:
george young gry@ll.mit.edu writes:
How can I fix this?
Re-create the owning user (which you evidently dropped), assigning it
sysid 101.
PG
| site_name | point | rank
+---+---+--
3 | Site D|22 |4
2 | Site B|90 |2
4 | Site X|98 |1
1 | Site A|40 |3
(4 rows)
-- George Young
--
Are the gods not just? Oh no, child.
What would become of us if they were? (CSL
On Thu, 04 Mar 2004 16:35:01 -0500
Tom Lane [EMAIL PROTECTED] threw this fish to the penguins:
george young [EMAIL PROTECTED] writes:
I've started putting debugging queries like:
select opwin.py: committing step signoff
in my app, just to have an entry in the postgres logfile
',
since there's nothing to distinguish one from another in the log.
Is there some cheaper (or more appropriate) sql statement that will show
up in the postgres log? I thought I remembered a message sql statement
or something like that.
-- George Young
--
Are the gods not just? Oh no, child
regardless of the number of rows...
- Original Message -
From: george young
To: [EMAIL PROTECTED]
Sent: Monday, November 24, 2003 1:59 AM
Subject: [SQL] increment int value in subset of rows?
[postgresql 7.4, SuSE x86 linux]
I have a table rtest with primary key (run
[postgresql 7.4, SuSE x86 linux]
I have a table rtest with primary key (run,seq) and other data. For a given value
of run, seq is a sequential run of integers, 1,2,3,4.. Now I want to
insert a row into this sequence, say run='foo', seq=2, adjusting the seq up for
all subsequent foo rows. My
,
though it would be nicer to get it directly through sql.
-- George Young
--
I cannot think why the whole bed of the ocean is
not one solid mass of oysters, so prolific they seem. Ah,
I am wandering! Strange how the brain controls the brain!
-- Sherlock Holmes in The Dying Detective
I have general design question about Postgres usage: How does one decide
how much, and what parts of logic should go in DB rules, triggers,
functions, constraints etc, versus what should go in the application?
I see postings here from people who obviously have a lot of domain
logic in the DB
[postgresql-7.2, pgsql, linux]
Here's a schema-design problem I've hit a few times -- it seems
like there should be a better way:
I have a machine table (140 rows), currently very static:
machine(machine_name text NOT NULL, machine_id smallint NOT NULL,
area text NOT NULL, text text
[linux, postgresql 7.2, 500MHz * 4 xeon cpu's, 1GB ram, hardware raid]
My current db has serveral instances of something like:
table foos(fooid int2, fooname text, foouser text, foobar int2 references
bars(barid))
table bars(barid int2, barname text, barcolor text, primary key(barid) )
[postgreql 7.2, linux]
I have a table T with columns run, wafer, and test:
T(run text, wafer int, test text)
Given a run and a set of wafers, I need the set of tests that match
*all* the specified wafers:
run wafer test
a 1 foo
a 2 foo
a 3 foo
a
span of
time. Null 'done' just means it's not done yet.
Unfortunately, the start time of a 'succesive' op is sometimes 1 second
later that the 'done' time of the previous one, so maybe using
the seq field is simpler.
Can anyone think of a way I can do this in postgres?
--
George Young, Rm
On Wed, 14 Mar 2001, you wrote:
On 3/14/01, 5:24:12 PM, George Young [EMAIL PROTECTED] wrote regarding [SQL]
I need to join successive log entries into one:
I have a table like:
run | seq | start| done
1415|261| 2001-01-29 12:36:55| 2001-02-07 13:02:38
ariable nm,
is passwd to the notify command. Since notify only takes a name, not a string,
I don't see how to proceed.
Is there some way in plsql to construct a string and have it executed in sql?
disappointed in plsql,
George
--
George Young, Rm. L-204[EMAIL PROT
37 matches
Mail list logo