Re: [GENERAL] BIG installations of PostgresQL?

2005-09-15 Thread Scott Marlowe
Title: RE: [GENERAL] BIG installations of PostgresQL? -Original Message- From: [EMAIL PROTECTED] on behalf of Logan Bowers Sent: Thu 9/15/2005 10:25 PM To: pgsql-general@postgresql.org Subject: [GENERAL] BIG installations of PostgresQL? Hello, My company is looking at two very lar

[GENERAL] BIG installations of PostgresQL?

2005-09-15 Thread Logan Bowers
Hello,   My company is looking at two very large DB vendors to bear most of data burden of our company; however I’d like to propose PostgresQL to handle some of the tasks, specifically a large number read-only search DBs.  Postgres already has the win in terms of features and it’s now do

Re: [GENERAL] Create a pg table from CSV with header rows

2005-09-15 Thread Michael Fuhr
On Thu, Sep 15, 2005 at 06:48:59PM -0400, Robert Fitzpatrick wrote: > Anyone know a package that can do this? Perferrably a Unix/Linux > package. It would be trivial to write a script in a language like Perl to read the first line of a file and generate a CREATE TABLE statement from it, then issue

Re: [GENERAL] Asychronous database replication

2005-09-15 Thread Greg Stark
Chris Browne <[EMAIL PROTECTED]> writes: > Well, what you clearly want/need is asynchronous multimaster... I didn't catch anything in his description that answered whether he needs multimaster or a simple single master with many slaves model would suffice. > I'm involved with Slony-I, which is

[GENERAL] ERROR from backend during send_query: 'ERROR: cursor "sql_cur0140cc48" does not exist'

2005-09-15 Thread [EMAIL PROTECTED]
The following errors only happen when using the "USE DECLARE/FETCH" option in the ODBC Driver. When DECLARE/FETCH is set, the data sent to some of our programs is reduced from 2 MBytes to 100 KBytes. We want to achieve this reduction. But, with the DECLARE/FETCH option set, implicit transactions ar

Re: [GENERAL] Deadlock

2005-09-15 Thread Michael Fuhr
[Please be careful with quoting -- you quoted some parts of my reply but not others so it looks like you wrote those sections. I've fixed that in this reply.] On Thu, Sep 15, 2005 at 03:20:02PM -0500, Bart McFarling wrote: > > > Also sometimes the database just freezes (RedHat EL 3.0 Postgresql 8

[GENERAL] Create a pg table from CSV with header rows

2005-09-15 Thread Robert Fitzpatrick
Anyone know a package that can do this? Perferrably a Unix/Linux package. -- Robert ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] CLUSTER equivalent

2005-09-15 Thread Alvaro Herrera
On Thu, Sep 15, 2005 at 05:09:51PM -0400, Kevin Murphy wrote: > Neil Conway wrote: > > >Kevin Murphy wrote: > > > >>I just wanted to confirm that the COPY command always stores data in > >>the table in the order in which it appears in the import file. > > > >This is not the case -- depending on t

Re: [GENERAL] CLUSTER equivalent

2005-09-15 Thread Kevin Murphy
Neil Conway wrote: Kevin Murphy wrote: I just wanted to confirm that the COPY command always stores data in the table in the order in which it appears in the import file. This is not the case -- depending on the content of the FSM, the newly added rows might be distributed throughout the t

Re: [GENERAL] character varying == text?

2005-09-15 Thread Tom Lane
CSN <[EMAIL PROTECTED]> writes: > Just something I was curious about - is there any > difference at all between "character varying" (in the > SQL spec) without a length specified and "text" (not > in the SQL spec)? The SQL standard doesn't allow "character varying" without a length spec. But yeah

Re: [GENERAL] Asychronous database replication

2005-09-15 Thread Chris Browne
[EMAIL PROTECTED] (Steve Manes) writes: > I have a project on my plate which will involve potentially hundreds > of PG8 databases in the field which will need to synchronize data with > a central database. The company is a secular nonprofit which delivers > medical services to underprivileged kids

Re: [GENERAL] Questions about "varchar" NOT NULL default = char(1)

2005-09-15 Thread Neil Conway
Emi Lu wrote: Greetings, If one column "col1" is defined as : col1 varchar(1) not null default '' Does it means that col1's definition is equal to col1 char(1) not null default '' Not quite; for example, neilc=# create table t1 (x char(1) not null); CREATE TABLE neilc=# create table t2 (x

[GENERAL] character varying == text?

2005-09-15 Thread CSN
Just something I was curious about - is there any difference at all between "character varying" (in the SQL spec) without a length specified and "text" (not in the SQL spec)? Thanks, CSN __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://m

Re: [GENERAL] CLUSTER equivalent

2005-09-15 Thread Neil Conway
Kevin Murphy wrote: I just wanted to confirm that the COPY command always stores data in the table in the order in which it appears in the import file. This is not the case -- depending on the content of the FSM, the newly added rows might be distributed throughout the table. -Neil ---

Re: [GENERAL] Deadlock

2005-09-15 Thread Bart McFarling
On Thu, Sep 15, 2005 at 12:32:05PM -0500, Bart McFarling wrote: > Is there some kind of log, table or something that I could get more > information about a deadlock situation that is occurring in my database? I > just get a transaction number and a process id, which is useless to me > because m

[GENERAL] Questions about "varchar" NOT NULL default = char(1) ?

2005-09-15 Thread Emi Lu
Greetings, If one column "col1" is defined as : col1 varchar(1) not null default '' Does it means that col1's definition is equal to col1 char(1) not null default '' Put it another way, will char '' be saved as char(1) or char '' does not use space at all? Thanks a lot, Emi -

Re: [GENERAL] Howto create a plperlu function as user (not superuser)??

2005-09-15 Thread David Fetter
On Wed, Sep 14, 2005 at 04:11:25PM +1200, Brent Wood wrote: > Hi, > > My problem is that the language needs to be plperlu (the unsecured > implementation of plperl) to be allowed to execute the system call > to get the depth at the specified location. To work, the plperlu > function must be create

Re: [GENERAL] Deadlock

2005-09-15 Thread Michael Fuhr
On Thu, Sep 15, 2005 at 12:32:05PM -0500, Bart McFarling wrote: > Is there some kind of log, table or something that I could get more > information about a deadlock situation that is occurring in my database? I > just get a transaction number and a process id, which is useless to me > because my ap

Re: [GENERAL] How to check is the table system

2005-09-15 Thread Martijn van Oosterhout
On Thu, Sep 15, 2005 at 09:12:44PM +0300, wrote: > Hello! > >In what way can I determine is the table system? ODBC driver does it > by checking table name's prefix: if it begins with 'pg_' - driver > desides that the table is system, but that's a bad idea. I can create > table

[GENERAL] CLUSTER equivalent

2005-09-15 Thread Kevin Murphy
I just wanted to confirm that the COPY command always stores data in the table in the order in which it appears in the import file. I.e., if the import file is sorted ahead of time, am I correct in assuming that the COPY command can have the same effect as CLUSTER'ing (or as creating a new tab

Re: [GENERAL] How to check is the table system

2005-09-15 Thread Tom Lane
=?UTF-8?B?0JDQvdC00YDQtdC5?= <[EMAIL PROTECTED]> writes: > In what way can I determine is the table system? ODBC driver does it > by checking table name's prefix: if it begins with 'pg_' - driver > desides that the table is system, but that's a bad idea. Yup, that's been incorrect since PG 7

Re: [GENERAL] How to check is the table system

2005-09-15 Thread Alvaro Herrera
On Thu, Sep 15, 2005 at 09:12:44PM +0300, wrote: >In what way can I determine is the table system? ODBC driver does it > by checking table name's prefix: if it begins with 'pg_' - driver > desides that the table is system, but that's a bad idea. I can create > table and call it

[GENERAL] How to check is the table system

2005-09-15 Thread Андрей
Hello! In what way can I determine is the table system? ODBC driver does it by checking table name's prefix: if it begins with 'pg_' - driver desides that the table is system, but that's a bad idea. I can create table and call it 'pg_mytable', but it won't become system! Big Thanks,

Re: [GENERAL] oracle's first_value function for postgres?

2005-09-15 Thread Ron Mayer
Martijn van Oosterhout wrote: On Tue, Sep 13, 2005 at 12:15:21PM -0700, Ben wrote: Oracle has a very handy function called first_value, which can be used to turn a set like this: Look at DISTINCT ON () Does postgres have something equivalent, or, even better, is there a reasonable way to

[GENERAL] Deadlock

2005-09-15 Thread Bart McFarling
Is there some kind of log, table or something that I could get more information about a deadlock situation that is occurring in my database? I just get a transaction number and a process id, which is useless to me because my application terminates on any errors from the database? It occurs infreque

Re: [GENERAL] Problem with 64-bit Postgres

2005-09-15 Thread Tom Lane
"Peter Alberer" <[EMAIL PROTECTED]> writes: > Hmm, i just tried to do the same thing (ppc64 sh, ...) but it seems to me > that the result is a 32bit executable: Hmm ... I got an elf64 executable. I'm not entirely sure what drives gcc's default choices about such things [ digs around... ] The com

Re: [GENERAL] Problem with 64-bit Postgres

2005-09-15 Thread Peter Alberer
Hmm, i just tried to do the same thing (ppc64 sh, ...) but it seems to me that the result is a 32bit executable: [EMAIL PROTECTED] pg803]# ldd bin/psql libpq.so.4 => /opt/learn-bench/pg803/lib/libpq.so.4 (0x0ff95000) libz.so.1 => /usr/lib/libz.so.1 (0x0fbf) libreadline

Re: [GENERAL] Strange Bug in exim4 postgresql lookup code or libpq?

2005-09-15 Thread Tom Lane
Alexander Neumann <[EMAIL PROTECTED]> writes: > In short terms: The result code is PGRES_FATAL_ERROR, but the error message > is an empty string. AFAIK that shouldn't happen, unless perhaps you are completely out of memory in the client-side process. What shows up in the postmaster error log when

Re: [GENERAL] Strange Bug in exim4 postgresql lookup code or libpq?

2005-09-15 Thread Alvaro Herrera
On Thu, Sep 15, 2005 at 03:14:10PM +0200, Alexander Neumann wrote: > I'm using exim4 together with postgresql. Sometimes, data lookups fail > mysteriously and on the exim side nobody was able to help. > > In short terms: The result code is PGRES_FATAL_ERROR, but the error message > is an empty s

Re: [GENERAL] Strange Bug in exim4 postgresql lookup code or libpq?

2005-09-15 Thread Martijn van Oosterhout
On Thu, Sep 15, 2005 at 03:14:10PM +0200, Alexander Neumann wrote: > Hi, > > I'm using exim4 together with postgresql. Sometimes, data lookups fail > mysteriously and on the exim side nobody was able to help. > > I opened up a bug in the exim bugzilla: > http://www.exim.org/bugzilla/show_bug.cg

Re: [GENERAL] ERROR: type "temp_gc" already exists

2005-09-15 Thread Janning Vygen
Am Donnerstag, 15. September 2005 15:31 schrieb Tom Lane: > Janning Vygen <[EMAIL PROTECTED]> writes: > > $ DROP TYPE temp_gc; > > ERROR: type "temp_gc" does not exist > > The temp schema is evidently not in your search path. You need > something like > drop type pg_temp_NNN.temp_gc; great

Re: [GENERAL] Problem with 64-bit Postgres

2005-09-15 Thread Tom Lane
"Peter Alberer" <[EMAIL PROTECTED]> writes: > The system is a p5-510 running redhat advanced server 4.0 update 1. the > kernel version is 2.6.9-11.EL. what other details about the machine could be > helpful? Well, it works perfectly fine for me on a ppc64 RHEL machine at Red Hat... I'm a bit sus

Re: [GENERAL] Speed problems

2005-09-15 Thread Scott Marlowe
On Wed, 2005-09-14 at 21:06, John Fabiani wrote: > On Wednesday 14 September 2005 08:23, Scott Marlowe wrote: > > > OK. But how many are you updating between regular vacuums? That's the > > real issue. If your regular vacuums aren't often enough, postgresql > > starts lengthening the tables ins

Re: [GENERAL] TSearch2 snowball version error

2005-09-15 Thread Teodor Sigaev
Fixed and commited in cvs. Patches for already existsing versions : http://www.sigaev.ru/gist/patch_snowball-7.4.gz http://www.sigaev.ru/gist/patch_snowball-8.0.gz I'm trying compile a new brazilian portuguese dictionary to TSearch2 contrib, but found the errors: -- Teodor Sigaev

[GENERAL] Strange Bug in exim4 postgresql lookup code or libpq?

2005-09-15 Thread Alexander Neumann
Hi, I'm using exim4 together with postgresql. Sometimes, data lookups fail mysteriously and on the exim side nobody was able to help. In short terms: The result code is PGRES_FATAL_ERROR, but the error message is an empty string. I opened up a bug in the exim bugzilla: http://www.exim.org/bugzi

Re: [GENERAL] Howto create a plperlu function as user (not superuser)??

2005-09-15 Thread Brent Wood
On Wed, 14 Sep 2005, Tom Lane wrote: > Brent Wood <[EMAIL PROTECTED]> writes: > > That is not me. Sigh. Is there any way I can develop (with the various > > "create or replace function" iterations this wiil probably require) this > > plperlu function as a non superuser? > > If you could, it woul

Re: [GENERAL] Problem with 64-bit Postgres

2005-09-15 Thread Peter Alberer
The system is a p5-510 running redhat advanced server 4.0 update 1. the kernel version is 2.6.9-11.EL. what other details about the machine could be helpful? regards, peter -Ursprüngliche Nachricht- Von: Tom Lane [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 15. September 2005 16:22

Re: [GENERAL] Problem with 64-bit Postgres

2005-09-15 Thread Tom Lane
"Peter Alberer" <[EMAIL PROTECTED]> writes: > Server says: > LOG: setsockopt(TCP_NODELAY) failed: Operation not supported It's pretty unclear why that would fail if it works in 32-bit mode. Kernel bug maybe? What is the platform exactly? regards, tom lane --

[GENERAL] Asychronous database replication

2005-09-15 Thread Steve Manes
I have a project on my plate which will involve potentially hundreds of PG8 databases in the field which will need to synchronize data with a central database. The company is a secular nonprofit which delivers medical services to underprivileged kids as well as to disaster victims like those h

[GENERAL] Problem with 64-bit Postgres

2005-09-15 Thread Peter Alberer
Hi, i am having a problem with a test installation of postgres 8.0.3 on a 64-bit power5 system. Let me say first that the system seems to work correctly when compiled in 32-bit mode (which seems to be standard compile mode with gcc on this installation). I compiled postgres in 64-bit mode by ad

Re: [GENERAL] ERROR: type "temp_gc" already exists

2005-09-15 Thread Tom Lane
Janning Vygen <[EMAIL PROTECTED]> writes: > $ DROP TYPE temp_gc; > ERROR: type "temp_gc" does not exist The temp schema is evidently not in your search path. You need something like drop type pg_temp_NNN.temp_gc; regards, tom lane ---(en

Re: [GENERAL] TSearch2 snowball version error

2005-09-15 Thread Teodor Sigaev
Snowball changes interfaces, I'll update tsearh2 sources today or tommorow. William Leite Araújo wrote: Hi, I'm trying compile a new brazilian portuguese dictionary to TSearch2 contrib, but found the errors: portuguese_stem.c: In function `r_prelude': portuguese_stem.c:481: error: v

Re: [GENERAL] Help trying to write my first plpgsql function...

2005-09-15 Thread Bjørn T Johansen
Yes, I did and I found an answer... :) But I am trying to use this function in a report designer and the result from the select is in the way of the real data from the fetch... Is there a way around this? BTJ hubert depesz lubaczewski wrote: > On 9/15/05, *Bjørn T Johansen* <[EMAIL PROTECTED]

Re: [GENERAL] Copy DataBases Server to server

2005-09-15 Thread Tino Wildenhain
nicolas.hafner schrieb: Hi everyone, I've a problem that i'am not able to solve alone (i'm kinda newbie on postgresql). we were running PostgreSQL 7.4 under Linux (Mandriva) but our HDD crashs and we lost the system but were able to backup the database files to an other HDD. now we want to cop

Re: [GENERAL] Partial dates

2005-09-15 Thread Marco Colombo
On Wed, 2005-09-14 at 15:49 +1200, Brent Wood wrote: > > Sanitizing is one thing, inventing data to fit an incomplete value into a > date datatype is not good practice. Choose another datatype, or make a new one, or split the date into columns. The type of your data is not a timestamp nor a date.

[GENERAL] Copy DataBases Server to server

2005-09-15 Thread nicolas.hafner
Hi everyone, I've a problem that i'am not able to solve alone (i'm kinda newbie on postgresql). we were running PostgreSQL 7.4 under Linux (Mandriva) but our HDD crashs and we lost the system but were able to backup the database files to an other HDD. now we want to copy the databases to our n

Re: [GENERAL] Help trying to write my first plpgsql function...

2005-09-15 Thread hubert depesz lubaczewski
On 9/15/05, Bjørn T Johansen <[EMAIL PROTECTED]> wrote: But this function does not do what I need it to do... I want x rows returned, butinstead I just get a stringname...Either how do I use this name or how do I return x rows? for refcursors - just use returned name in subsequent "FETCH FROM "; f

Re: [GENERAL] Help trying to write my first plpgsql function...

2005-09-15 Thread Bjørn T Johansen
Oki, I found a way... begin; select trykkstatus(1,'refcurs'); (I have added one parameter to know the cursor name) fetch all from refcurs; commit; But this returns two rowsets, first one for the select and then one for the fetch, but how do I get rid of the row that is returned by the select?

Re: [GENERAL] Help trying to write my first plpgsql function...

2005-09-15 Thread Bjørn T Johansen
Yes, of course But this function does not do what I need it to do... I want x rows returned, but instead I just get a stringname... Either how do I use this name or how do I return x rows? BTJ Gnanavel S wrote: > 'IF' block is not ended. > > On 9/15/05, *Bjørn T Johansen* <[EMAIL PROTECTE

Re: [GENERAL] Help trying to write my first plpgsql function...

2005-09-15 Thread Gnanavel S
'IF' block is not ended.On 9/15/05, Bjørn T Johansen <[EMAIL PROTECTED]> wrote: I am trying to write a function that returns x rows, where x >= 0 and this is what Ihave come up with...:CREATE OR REPLACE FUNCTION trykkStatus (pressID SMALLINT) RETURNS REFCURSOR AS 'declareorderID ordrenew.id%TY

[GENERAL] Help trying to write my first plpgsql function...

2005-09-15 Thread Bjørn T Johansen
I am trying to write a function that returns x rows, where x >= 0 and this is what I have come up with...: CREATE OR REPLACE FUNCTION trykkStatus (pressID SMALLINT) RETURNS REFCURSOR AS ' declare orderID ordrenew.id%TYPE; cur REFCURSOR; begin select id into orderID from ordrenew where now

Re: [GENERAL] ERROR: type "temp_gc" already exists

2005-09-15 Thread Janning Vygen
> Janning Vygen writes: > > Am Samstag, 10. September 2005 18:05 schrieb Tom Lane: > >> If there's no pg_depend entry then DROP TYPE should work. Otherwise > >> you might have to resort to manually DELETEing the pg_type row. > > > Thanks for your detailed answer. I don't want to do anything wron

Re: [GENERAL] MS SQL - PostgreSQL

2005-09-15 Thread Klint Gore
On Thu, 15 Sep 2005 07:16:25 +0200, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Am Donnerstag, den 15.09.2005, 07:43 +0700 schrieb Irfan Syukur: > > Dear Tino, > > > > In MS SQL, I can execute store procedure that I do not know it's name yet. > > > > A Simplicity example : > >CREATE proce