Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Peter Kovacs
Sorry for the naive question, but: is there a problem with analyze doing full table scans? Analyze will not lock anything, will it? Peter Greg Stark wrote: Tom Lane <[EMAIL PROTECTED]> writes: "Ed L." <[EMAIL PROTECTED]> writes: So, does this sound like we just happened to get repeat

Re: [GENERAL] PGSQL Database Recovery in Portland Oregon Area needed ASAP

2006-05-17 Thread Martijn van Oosterhout
On Tue, May 16, 2006 at 09:53:54AM -0700, Mark Holm wrote: > I have a client that is running an older version of Lyris List > Manager against PostGres 7.1.2, that has crashed their database > beyond my ability to recover it. The error that I am getting when we > try and restart the database is: Ve

Re: [GENERAL] PG_DIAG_STATEMENT_POSITION Where is it defined?

2006-05-17 Thread Martijn van Oosterhout
On Wed, May 17, 2006 at 03:58:21PM -0500, Tony Caduto wrote: > Tony Caduto wrote: > >http://www.postgresql.org/docs/8.1/static/libpq-exec.html > >it should be a integer not 'P' > > > I got it working, in Pascal you have to pass P as ord('P') > > PQresultErrorField(fstatement,ord('P')); > > It's o

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > "Ed L." <[EMAIL PROTECTED]> writes: > > So, does this sound like we just happened to get repeatedly > > horribly unrepresentative random samples with stats target at > > 10? Are we at the mercy of randomness here? Or is there a > > better preventive proc

Re: [GENERAL] Contributing code

2006-05-17 Thread Tom Lane
Tim Allen <[EMAIL PROTECTED]> writes: > Don Y wrote: >> So, I'll deploy them and get feedback on which features I >> may need to add (some of the data types are probably a bit >> too exotic for most users). I figure I can always contribute >> them just before a release... > Just before a release

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > So, does this sound like we just happened to get repeatedly > horribly unrepresentative random samples with stats target at > 10? Are we at the mercy of randomness here? Or is there a > better preventive procedure we can follow to systematically > identif

Re: [GENERAL] Contributing code

2006-05-17 Thread Tim Allen
Don Y wrote: So, I'll deploy them and get feedback on which features I may need to add (some of the data types are probably a bit too exotic for most users). I figure I can always contribute them just before a release... Just before a release would actually be a bad time to contribute the co

Re: [GENERAL] Add column and specify the column position in a table

2006-05-17 Thread Samer Abukhait
the position doesn't really matter in any relational structure.. does it? On 5/17/06, Emi Lu <[EMAIL PROTECTED]> wrote: Hello, I am trying to insert one column to a specific position in a table. In mysql, I can do: . create table test(id varchar(3), name varchar(12)); . alter table test add co

Re: [GENERAL] Server/Database/Schema Definitions

2006-05-17 Thread John DeSoi
On May 16, 2006, at 10:23 AM, Brandon E Hofmann wrote: When coding table and function scripts, how do you specify which server/database/schema where you want new tables and functions to reside? Every time I execute my creation scripts, it puts everything in the public schema under the Post

Re: [GENERAL] Server/Database/Schema Definitions

2006-05-17 Thread Jim C. Nasby
On Tue, May 16, 2006 at 09:23:09AM -0500, Brandon E Hofmann wrote: > > When coding table and function scripts, how do you specify which > server/database/schema where you want new tables and functions to reside? > Every time I execute my creation scripts, it puts everything in the public > schema

Re: [GENERAL] Concatenate WAL contents

2006-05-17 Thread Houssais Hugues
Thanks to Jim for replying us about WAL archiving! Indeed, WAL archiving has been abandoned for our needs. The content logged in WAL is more than only the modified data but the binary content of the modified table (or a part of the table). Then it is not possible to merge modifications on a commo

[GENERAL] PGSQL Database Recovery in Portland Oregon Area needed ASAP

2006-05-17 Thread Mark Holm
Title: PGSQL Database Recovery in Portland Oregon Area needed ASAP I have a client that is running an older version of Lyris List Manager against PostGres 7.1.2, that has crashed their database beyond my ability to recover it. The error that I am getting when we try and restart the database i

[GENERAL] Server/Database/Schema Definitions

2006-05-17 Thread Brandon E Hofmann
When coding table and function scripts, how do you specify which server/database/schema where you want new tables and functions to reside? Every time I execute my creation scripts, it puts everything in the public schema under the PostgreSQL server. I'm new to PostgreSQL and haven't found any doc

Re: [GENERAL] postgres vs. oracle for very large tables

2006-05-17 Thread Graves, John
On Mon, 15 May 2006 16:00:04 -0500, Scott Marlowe wrote: > 5: You're gonna need to load test this to see. You can get > the oracle 10G express for free. I think that one handles > multiple connections, but is limited to 2 gigs of data. The exact limitations of Oracle Database XE are as follows

Re: [GENERAL] ALTER SEQUENCE

2006-05-17 Thread Jim C. Nasby
On Wed, May 17, 2006 at 03:00:48PM -0700, Don Y wrote: > >I see the documentation mention added August 1, 2005 byt Tom Lane. > > Date tag on the bottom of my man pages is "2005-01-17" -- so that > explains *that*! :> This is a very minor reason why you should be running the most recent 8.0.x rel

Re: RES: [GENERAL] Add column and specify the column position in

2006-05-17 Thread Jim C. Nasby
On Wed, May 17, 2006 at 05:48:52PM -0400, Emi Lu wrote: > I think it is a very useful feature for postgresql to support it. > > If we have this feature supported, I do not have to recreate the table > and resetup all foreign key constraints, views, triggers, etc that are > based on the table. U

Re: [GENERAL] Contributing code

2006-05-17 Thread Jim C. Nasby
On Wed, May 17, 2006 at 10:46:52AM -0700, Don Y wrote: > Martijn van Oosterhout wrote: > >On Tue, May 16, 2006 at 08:12:05PM -0700, Don Y wrote: > >>Hi, > >> > >>Is it possible to have one of my user defined data types > >>reviewed/critiqued to see if there are things that I am > >>not doing proper

Re: [GENERAL] Announce: GPL Framework centered on Postgres

2006-05-17 Thread Jim C. Nasby
On Wed, May 17, 2006 at 08:33:56AM +0100, Peter Wilson wrote: > The BSD license does allow others to create a closed-source project from > your code - but my view is that isn't too important. You'd be the natural > port of call if they wanted consultancy on how to do that. I'd argue that if you

Re: [GENERAL] ALTER SEQUENCE

2006-05-17 Thread Bruce Momjian
Don Y wrote: > Bruce Momjian wrote: > > Don Y wrote: > >> Bruce Momjian wrote: > >>> Don Y wrote: > Hi, > > It doesn't appear that there is a way to rename a sequence > (ideally with a "cascade" action). > >>> > >>> Uh, the ALTER SEQUENCE manual page says: > >> Uh, the 8.0.3 man

Re: [GENERAL] Add column and specify the column position in a table

2006-05-17 Thread Joshua D. Drake
Emi Lu wrote: Hello, I am trying to insert one column to a specific position in a table. In mysql, I can do: . create table test(id varchar(3), name varchar(12)); . alter table test add column givename varchar(12) after id; I am looking for similar things in postgresql to add a new column to

Re: [GENERAL] FATAL: could not read statistics message

2006-05-17 Thread Jim C. Nasby
On Tue, May 16, 2006 at 07:24:43PM -0400, Sean Davis wrote: > Jim C. Nasby wrote: > >On Tue, May 16, 2006 at 03:41:07PM -0400, Sean Davis wrote: > > > >>I had cranked things up a bit from the standard install. > >> > >>shared_buffers = 15000 # min 16 or max_connections*2, 8KB > >>e

Re: [GENERAL] ALTER SEQUENCE

2006-05-17 Thread Don Y
Bruce Momjian wrote: Don Y wrote: Bruce Momjian wrote: Don Y wrote: Hi, It doesn't appear that there is a way to rename a sequence (ideally with a "cascade" action). Uh, the ALTER SEQUENCE manual page says: Uh, the 8.0.3 man page for ALTER SEQUENCE makes no mention of this. Nor does "\h AL

Re: RES: [GENERAL] Add column and specify the column position in

2006-05-17 Thread Emi Lu
This feature seems by a mysql add tu create table command, only mysql can do dat. Alejandro Michelin Salomon I think it is a very useful feature for postgresql to support it. If we have this feature supported, I do not have to recreate the table and resetup all foreign key constraints,

Re: [GENERAL] ALTER SEQUENCE

2006-05-17 Thread Bruce Momjian
Don Y wrote: > Bruce Momjian wrote: > > Don Y wrote: > >> Hi, > >> > >> It doesn't appear that there is a way to rename a sequence > >> (ideally with a "cascade" action). > > > > > > Uh, the ALTER SEQUENCE manual page says: > > Uh, the 8.0.3 man page for ALTER SEQUENCE makes no mention of this.

Re: [GENERAL] ALTER SEQUENCE

2006-05-17 Thread Don Y
Bruce Momjian wrote: Don Y wrote: Hi, It doesn't appear that there is a way to rename a sequence (ideally with a "cascade" action). Uh, the ALTER SEQUENCE manual page says: Uh, the 8.0.3 man page for ALTER SEQUENCE makes no mention of this. Nor does "\h ALTER SEQUENCE" in psql yield any po

RES: [GENERAL] Add column and specify the column position in a table

2006-05-17 Thread Alejandro Michelin Salomon \( Adinet \)
Hi Ying: This feature seems by a mysql add tu create table command, only mysql can do dat. Alejandro Michelin Salomon -->-Mensagem original- -->De: [EMAIL PROTECTED] -->[mailto:[EMAIL PROTECTED] Em nome de Emi Lu -->Enviada em: quarta-feira, 17 de maio de 2006 18:21 -->Para: pgsql-gen

[GENERAL] Add column and specify the column position in a table

2006-05-17 Thread Emi Lu
Hello, I am trying to insert one column to a specific position in a table. In mysql, I can do: . create table test(id varchar(3), name varchar(12)); . alter table test add column givename varchar(12) after id; I am looking for similar things in postgresql to add a new column to the correct po

Re: [GENERAL] PG_DIAG_STATEMENT_POSITION Where is it defined?

2006-05-17 Thread Tony Caduto
Tony Caduto wrote: Martijn van Oosterhout wrote: src/include/postgres_ext.h I did use grep but I am confused by what it showed, according to the docs: http://www.postgresql.org/docs/8.1/static/libpq-exec.html it should be a integer not 'P' Those symbols are used by PQresultErrorField whi

Re: [GENERAL] PG_DIAG_STATEMENT_POSITION Where is it defined?

2006-05-17 Thread Tony Caduto
Martijn van Oosterhout wrote: src/include/postgres_ext.h I did use grep but I am confused by what it showed, according to the docs: http://www.postgresql.org/docs/8.1/static/libpq-exec.html it should be a integer not 'P' Those symbols are used by PQresultErrorField which expects a integ

Re: [GENERAL] ALTER SEQUENCE

2006-05-17 Thread Bruce Momjian
Don Y wrote: > Hi, > > It doesn't appear that there is a way to rename a sequence > (ideally with a "cascade" action). Uh, the ALTER SEQUENCE manual page says: Some variants of ALTER TABLE can be used with sequences as well; for example, to rename a sequence use ALTER TABLE

Re: [GENERAL] PG_DIAG_STATEMENT_POSITION Where is it defined?

2006-05-17 Thread Martijn van Oosterhout
On Wed, May 17, 2006 at 03:28:45PM -0500, Tony Caduto wrote: > I have been searching through the cvs web browser for about 1/2 hour and > can't find where PG_DIAG_STATEMENT_POSITION > is defined. > > I need to know the integer value of the constant(pascal talk)/Symbol (c rgrep is your friend, o

[GENERAL] PG_DIAG_STATEMENT_POSITION Where is it defined?

2006-05-17 Thread Tony Caduto
I have been searching through the cvs web browser for about 1/2 hour and can't find where PG_DIAG_STATEMENT_POSITION is defined. I need to know the integer value of the constant(pascal talk)/Symbol (c talk) so I can add it to my Delphi client library. Thanks in advance -- Tony -

[GENERAL] ALTER SEQUENCE

2006-05-17 Thread Don Y
Hi, It doesn't appear that there is a way to rename a sequence (ideally with a "cascade" action). Nor does there appear to be a way to change the owner of a sequence. Obviously, I can DROP and recreate... *but*, how prudent (foolish?) would it be just to change the entries in the system tables

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Ed L.
On Wednesday May 17 2006 1:26 pm, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > I'm trying to understand what happened here, and I have a > > theory. > > The problem is the horrid misestimation of the selectivity of > "nursestation_key = 40": > >-> Bitmap Index Scan on

Re: [GENERAL] autovacuum "connections" are hidden

2006-05-17 Thread Tom Lane
Casey Duncan <[EMAIL PROTECTED]> writes: > however, when I did "select * from pg_stat_activity" on the pg > server, it showed no connection to that db. Then I looked at the > processes: > tmp0% ps ax | grep test_seg1 > 10317 ?D 0:36 postgres: autovacuum process test_seg1 Hmm, au

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > I'm trying to understand what happened here, and I have a theory. The problem is the horrid misestimation of the selectivity of "nursestation_key = 40": -> Bitmap Index Scan on idx_visit_nursestation_key (cost=0.00..69.35 rows=4956 width=0

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Ed L.
On Wednesday May 17 2006 11:44 am, Ed L. wrote: > On Wednesday May 17 2006 10:37 am, Ed L. wrote: > > Can someone help me understand why the 8.1.2 query below is > > using a seq scan instead of an index scan? All relevant > > columns appear to be indexed and all tables vacuum analyzed. > > > > > >

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Ed L.
On Wednesday May 17 2006 10:37 am, Ed L. wrote: > Can someone help me understand why the 8.1.2 query below is > using a seq scan instead of an index scan? All relevant > columns appear to be indexed and all tables vacuum analyzed. > > > $ psql -c "explain analyze select * from visit inner join > p

Re: [GENERAL] Contributing code

2006-05-17 Thread Don Y
Martijn van Oosterhout wrote: On Tue, May 16, 2006 at 08:12:05PM -0700, Don Y wrote: Hi, Is it possible to have one of my user defined data types reviewed/critiqued to see if there are things that I am not doing properly? Or, other things that I should be including? Or, should I just contribu

[GENERAL] autovacuum "connections" are hidden

2006-05-17 Thread Casey Duncan
Trying to drop a database, this morning I ran into the not so unusual error: dropdb: database removal failed: ERROR: database "test_seg1" is being accessed by other users however, when I did "select * from pg_stat_activity" on the pg server, it showed no connection to that db. Then I loo

Re: [GENERAL] DB structure of PostGRE

2006-05-17 Thread Tom Lane
"venu Vempati" <[EMAIL PROTECTED]> writes: > Where can I find a document about the structure of database/schema/users > etc.. > and how is the data actually stored, like the datafiles, tablespaces. http://developer.postgresql.org/docs/postgres/storage.html regards, tom lan

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread John D. Burger
Ed L. wrote: Can someone help me understand why the 8.1.2 query below is using a seq scan instead of an index scan? Because the planner thinks a sequential scan would be faster than an index scan - in many situations, this is the case. See the FAQ: http://www.postgresql.org/docs/faqs.FAQ

[GENERAL] Why won't it index scan?

2006-05-17 Thread Ed L.
Can someone help me understand why the 8.1.2 query below is using a seq scan instead of an index scan? All relevant columns appear to be indexed and all tables vacuum analyzed. $ psql -c "analyze verbose patient" INFO: analyzing "public.patient" INFO: "patient": scanned 3000 of 335

Re: [GENERAL] DB structure of PostGRE

2006-05-17 Thread Terry Lee Tucker
On Wednesday 17 May 2006 12:19 pm, "venu Vempati" <[EMAIL PROTECTED]> thus communicated: --> Hi, --> my confession first..I have introduced myself this PostGRE db and I have a --> basic doubt? --> --> Where can I find a document about the structure of database/schema/users --> etc.. --> and how i

[GENERAL] DB structure of PostGRE

2006-05-17 Thread venu Vempati
Hi,my confession first..I have introduced myself this PostGRE db and I have a basic doubt?Where can I find a document about the structure of database/schema/users etc..and how is the data actually stored, like the datafiles, tablespaces. by now you must have guessed I have some knowledge of Oracle.

Re: [GENERAL] Age function

2006-05-17 Thread Alban Hertroys
Berend Tober wrote: Alban Hertroys wrote: > So, One and a half hour in the future is actually 17 days ago? > Interesting... Either I am doing something wrong, or postgres is, I have > my suspicions ;) Your suspicions are correct that you are doing, or rather, understanding something incorre

Re: [GENERAL] pg_dump index/constraint creation order

2006-05-17 Thread Ed L.
On Monday May 15 2006 11:14 am, Vivek Khera wrote: > On May 14, 2006, at 12:27 AM, Ed L. wrote: > > While watching a 9-hour 60GB network load from 7.4.6 pg_dump > > into 8.1.2, I noticed the order in which indices and > > constraints are created appears to be their creation order. > > If you use th

Re: [GENERAL] GUI Interface

2006-05-17 Thread Dave Page
> -Original Message- > From: Christian Kratzer [mailto:[EMAIL PROTECTED] > Sent: 17 May 2006 15:30 > To: Dave Page > Cc: Tino Wildenhain; Christopher Browne; pgsql-general@postgresql.org > Subject: RE: [GENERAL] GUI Interface > > Hi, > > On Wed, 17 May 2006, Dave Page wrote: > >>

Re: [GENERAL] Age function

2006-05-17 Thread Berend Tober
Alban Hertroys wrote: > Look here: > > template1=> select age(now() + '01:30:00'::interval); >age > -- > -17:02:41.247957 > (1 row) > > So, One and a half hour in the future is actually 17 days ago? > Interesting... Either I am doing something wrong, or postgres is, I hav

Re: [GENERAL] GUI Interface

2006-05-17 Thread Christian Kratzer
Hi, On Wed, 17 May 2006, Dave Page wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Kratzer Sent: 17 May 2006 15:14 To: Tino Wildenhain Cc: Christopher Browne; pgsql-general@postgresql.org Subject: Re: [GENERAL] GUI Interface I only use

Re: [GENERAL] GUI Interface

2006-05-17 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Christian Kratzer > Sent: 17 May 2006 15:14 > To: Tino Wildenhain > Cc: Christopher Browne; pgsql-general@postgresql.org > Subject: Re: [GENERAL] GUI Interface > > I only use pgadmin3 if I need a

Re: [GENERAL] GUI Interface

2006-05-17 Thread Christian Kratzer
Hi, On Wed, 17 May 2006, Tino Wildenhain wrote: Christopher Browne wrote: Also most DBAs are not hard core OSS programmers and anyone coming from a commercial system is more than likely used to running the admin tools on windows. We have a whole department of DBAs, *none* of whom have Micros

Re: [GENERAL] Age function

2006-05-17 Thread Csaba Nagy
> template1=> select age(now() + '01:30:00'::interval); > age > -- > -17:02:41.247957 > (1 row) > > So, One and a half hour in the future is actually 17 days ago? > Interesting... Either I am doing something wrong, or postgres is, I have > my suspicions ;) > I guess t

Re: [GENERAL] GUI Interface

2006-05-17 Thread Tino Wildenhain
Christopher Browne wrote: >> Also most DBAs are not hard core OSS programmers and anyone coming >> from a commercial system is more than likely used to running the >> admin tools on windows. > > We have a whole department of DBAs, *none* of whom have Microsoft on > their desktops. > > Further, th

[GENERAL] Age function

2006-05-17 Thread Alban Hertroys
Hi, I believe I already mentioned something along these lines as an aside, but this time I need it to work... Look here: template1=> select age(now() + '01:30:00'::interval); age -- -17:02:41.247957 (1 row) So, One and a half hour in the future is actually 17 days ago

Re: [GENERAL] [Linux] Suitable 64bit

2006-05-17 Thread Scott Venter
thank you for your reply. I will take a look. -Original Message- From: Peter Eisentraut [mailto:[EMAIL PROTECTED] Sent: Wed 5/17/2006 12:55 PM To: pgsql-general@postgresql.org Cc: Scott Venter Subject:Re: [GENERAL] [Linux] Suitable 64bit Am Mittwoch, 17. Mai 2006 06:

Re: [GENERAL] Announce: GPL Framework centered on Postgres

2006-05-17 Thread Kenneth Downs
Anastasios Hatzis wrote: Kenneth Downs wrote: My company has developed an application development framework that targets PostgreSQL as its back-end, with PHP in the web layer. Is this product somehow related to AndroMDA (which is usually pronounced 'Andromeda')? http://www.andromda.org/

Re: [GENERAL] [Linux] Suitable 64bit

2006-05-17 Thread Peter Eisentraut
Am Mittwoch, 17. Mai 2006 06:58 schrieb Scott Venter: > Can anyone advise as to which binary I should use for SUSE 10. Look here: ftp://ftp.suse.com/pub/projects/postgresql -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)

Re: [GENERAL] Announce: GPL Framework centered on Postgres

2006-05-17 Thread Kenneth Downs
Tom Lane wrote: Kenneth Downs <[EMAIL PROTECTED]> writes: If it turns out that nobody can release a closed source app, I will definitely reconsider and look again at LGPL, but I am not convinced you cannot do so. If you seek to provide a closed source app tha

Re: [GENERAL] best practice in upgrading db structure

2006-05-17 Thread Csaba Nagy
> I will ask, though, why use XML/XSL, why not use a format that lets > you load the data to tables, then you do a huge number of tricks with > it prior to generating the DDL, not the least of which is diff'ing > current structure to see what needs to be changed. > Well, XML/XSLT is indeed not th

Re: [GENERAL] Announce: GPL Framework centered on Postgres

2006-05-17 Thread Peter Wilson
Tim Allen wrote: Kenneth Downs wrote: GPL is to spread it as far and wide as possible as fast as possible. LGPL? My concern would be, I can't use this toolkit for a closed source application if it is GPL. That may be your intent (which I actually don't have a business problem with), I was