Re: [GENERAL] Port?

2003-07-30 Thread Kallol Nandi
How come? It is working here since years. Can you try this command and send me the screenshot of the error you are getting if any. pg_ctl start -o -i & Regards, Kallol. -Original Message- From: b b [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:06 To: Kallol Nandi Subject: Re

Re: [GENERAL] Port?

2003-07-30 Thread Kallol Nandi
Hi, Include -i in the options for starting the server. e.g. pg_ctl start -o -i & -i enables TCP/IP connections Regards, Kallol -Original Message- From: b b [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 11:56 To: Kallol Nandi Subject: Re: [GENERAL] Port? I looked up the pg

Re: [GENERAL] Port?

2003-07-30 Thread Ron Johnson
On Thu, 2003-07-31 at 00:56, b b wrote: > What port does the postgresql server listen on. I am > trying to connect using pg_connect from php using port > 5432 with the following command: > $dbconn3 = pg_connect ("host=localhost port=5432 > dbname=dbname user=myname password=mypass"); > > I get

Re: [GENERAL] Port?

2003-07-30 Thread Kallol Nandi
Have you started postmaster with the -i option? If not then doing so will solve your problem. Regards, Kallol. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of b b Sent: Thursday, July 31, 2003 11:27 To: postgresql Subject: [GENERAL] Port? What port does

[GENERAL] Port?

2003-07-30 Thread b b
What port does the postgresql server listen on. I am trying to connect using pg_connect from php using port 5432 with the following command: $dbconn3 = pg_connect ("host=localhost port=5432 dbname=dbname user=myname password=mypass"); I get the following: Warning: pg_connect(): Unable to conn

Re: [GENERAL] hexadecimal to decimal

2003-07-30 Thread Joe Conway
Tom Lane wrote: It seems entirely sensible to me for the postmaster to choke on invalid settings in postgresql.conf. Better than failing to mention the problem at all, anyway. 2) do you want a patch that exports plperl_init_all() (and I guess similar init functions in pltcl and plpython)? Yeah, I

Re: [GENERAL] hexadecimal to decimal

2003-07-30 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > My reasoning at the time was that library preloading shouldn't prevent > the postmaster from starting, even if it is unsuccessful, but now I > wonder if that was a good idea. It seems entirely sensible to me for the postmaster to choke on invalid settings

Re: [GENERAL] hexadecimal to decimal

2003-07-30 Thread Joe Conway
Tom Lane wrote: Joe Conway <[EMAIL PROTECTED]> writes: I tried that after I posted, but only saw roughly 30% improvement (which is consistent with my earlier tests IIRC). Not bad, but this still left plperl initial call at ~40 msec versus plpgsql at ~4 msec. Hm. And the first call to a plpgsql f

Re: [GENERAL] psql -e

2003-07-30 Thread Bruce Momjian
I assume this is the fflush you mentioned. Patch attached and applied. --- Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Rajesh Kumar Mallah writes: > >> The echo feature of psql echos the query after i

Re: [GENERAL] hexadecimal to decimal

2003-07-30 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> It might help if libperl were to be preloaded into the postmaster in the >> way you created ... > I tried that after I posted, but only saw roughly 30% improvement (which > is consistent with my earlier tests IIRC). Not bad, but this st

Re: [GENERAL] hexadecimal to decimal

2003-07-30 Thread Joe Conway
Tom Lane wrote: Presumably, the 50 msec difference represents the time to load up the perl library and initialize a perl interpreter. It might help if libperl were to be preloaded into the postmaster in the way you created ... I tried that after I posted, but only saw roughly 30% improvement (whi

Re: [GENERAL] hexadecimal to decimal

2003-07-30 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > So based on this simple test, I'd say that if you only run the function > once per connect, use plpgsql, but if you run the function many times > during one backend session, use perl. Presumably, the 50 msec difference represents the time to load up the p

Re: [GENERAL] Don't removes/recycles WAL files at all

2003-07-30 Thread Tom Lane
Michael Govorun <[EMAIL PROTECTED]> writes: > I've found answer! Postgresql have been compiled with aggressive > optimizations: > gcc version egcs-2.91.66 > CFLAGS='-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro > -march=pentiumpro -fomit-frame-pointer -fno-exceptions' > After reco

Re: [GENERAL] Don't removes/recycles WAL files at all

2003-07-30 Thread Tom Lane
Michael Govorun <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> There's something broken there. Check to see why checkpoint operations >> are not completing (look in the postmaster log for relevant error >> messages). Open transactions should not affect this. > No other err

Re: [GENERAL] Postgres Hanging on Inserts

2003-07-30 Thread Alvaro Herrera Munoz
On Wed, Jul 30, 2003 at 01:03:55PM -0500, Adam Kavan wrote: > I have found the problem (I think) below is the list of all the locks > pending on the relation. The relation is a hash index on the table that is > being INSERT'd rapidly. From what I can see pid 10024 and 10025 both have > an Exclus

Re: Minimal system (was Re: [GENERAL] Basic questions before start)

2003-07-30 Thread DeJuan Jackson
Ron Johnson wrote: On Wed, 2003-07-30 at 09:25, scott.marlowe wrote: On Wed, 30 Jul 2003, Gogulus wrote: As the clients should be able to work without network connection, they have to have a local database, and if net connection is on, do the synchronization with

Re: [GENERAL] Diff between contrib/dbmirror and rserv

2003-07-30 Thread The Hermit Hacker
On Wed, 30 Jul 2003, Andrew Sullivan wrote: > A version of replication that descended from rserv is going to appear on > gborg someday soon. I'm not sure when. Got hit by a death in the family this past weekend ... will dive into moving this forward more over the next few days :( Sorry for the

Re: [GENERAL] Postgres Hanging on Inserts

2003-07-30 Thread Adam Kavan
- Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, July 30, 2003 9:25 AM Subject: Re: [GENERAL] Postgres Hanging on Inserts > Adam Kavan <[EMAIL PROTECTED]> writes: > > I looked into pg_locks and they are all waiting

[GENERAL] Don't removes/recycles WAL files at all

2003-07-30 Thread Michael Govorun
Please, help. versions: 7.3.3, 7.3.4 Server don't recycles or removes WAL files at all, generating 12-20 files every day. -rw---1 postgres postgres 16777216 Jul 29 01:54 -rw---1 postgres postgres 16777216 Jul 29 01:55 0001 -rw---1 postgres po

Minimal system (was Re: [GENERAL] Basic questions before start)

2003-07-30 Thread Ron Johnson
On Wed, 2003-07-30 at 09:25, scott.marlowe wrote: > On Wed, 30 Jul 2003, Gogulus wrote: > > > As the clients should be able to work without network connection, they > > have to have a local database, and if net connection is on, do the > > synchronization with master db. The main idea is, sale c

[GENERAL] plpython and current_timestamp / current_user

2003-07-30 Thread Vitor Tortorello
Hi. 1 - current_timestamp and current_user are not enable in plpython? 2 - About timestamp using plpython: a. upd= strftime(''%Y-%m-%d %H:%M:%S'', localtime()) TD["new"]["updated"] = upd psql:/tmp/insereusuario.sql:2: NOTICE: ('2003-07-30 13:55:32',) psql:/tmp/insereusuario.sql:2: ERROR

Re: [GENERAL] Alter table

2003-07-30 Thread Richard Huxton
On Wednesday 30 July 2003 17:21, Guillaume Houssay wrote: > I am looking for the SQL query to add a column in a table and having the > column at specific position in the table (not at the end of the table). Sorry - you'll need to dump and restore the table. PG only adds columns at the end. --

Re: [GENERAL] Alter table

2003-07-30 Thread scott.marlowe
On Wed, 30 Jul 2003, Guillaume Houssay wrote: > I am looking for the SQL query to add a column in a table and having > the column at specific position in the table (not at the end of the > table). > > Do you have any idea ? I think that's a TODO item (i.e. it's not implemented yet.) Currently

Re: [GENERAL] Diff between contrib/dbmirror and rserv

2003-07-30 Thread Andrew Sullivan
On Wed, Jul 30, 2003 at 11:16:53AM +0200, Thierry Missimilly wrote: > Hi, > > I don't understand by reading the README files, what are the differences > between thes contrib dbmirror and rserv. They are different approaches to the implementation of the same thing. They're not related. > And is

Re: [GENERAL] ALTER TABLE...DROP CONSTRAINT

2003-07-30 Thread Freddy Menjívar M .
In post 7.2.x releases     ALTER TABLE tablename DROP CONSTRAINT is supported

[GENERAL] Alter table

2003-07-30 Thread Guillaume Houssay
I am looking for the SQL query to add a column in a table and having the column at specific position in the table (not at the end of the table).   Do you have any idea ?   GH

Re: [GENERAL] pg_dump

2003-07-30 Thread Andrew Sullivan
On Mon, Jul 28, 2003 at 07:18:13PM +0200, Frank Finner wrote: > Hi, > > surely you are right. I?m still using 7.2.3 as production database, so I > have no experience with .pgpass. Where to put .pgpass if you use pg_dump > from a PHP script and the database user is not a system user? I think you n

Re: [GENERAL] Clone a database to other machine

2003-07-30 Thread Andrew Sullivan
On Mon, Jul 28, 2003 at 01:38:34PM -0700, Terence Chang wrote: > customized database and initial data load into server 1. Can I just > copy all of the database files physically from server 1 to server 2 > and server 3? I assume this is one of the method to restore a > database. Not unless all the

Re: [GENERAL] concurrent writes

2003-07-30 Thread Andrew Sullivan
On Tue, Jul 29, 2003 at 01:07:57PM +0200, Andreas Jung wrote: > > This problem appeard in 7.3.2 but it seems to have been fixed in 7.3.3. > Our administrator complained that there has not been a notice in the > CHANGELOG...so I am hestitating about choosing Postgres vs. Oracle :-) I think your ad

Re: [GENERAL] concurrent writes

2003-07-30 Thread Andrew Sullivan
On Tue, Jul 29, 2003 at 12:33:06PM +0200, Andreas Jung wrote: > hi, > > we are running Postgres 7.3.3 successfully on our portal sites There's a nasty bug in 7.3.3 which is fixed in 7.3.4. > N processes need to write update/insert within the same time and within > the same transaction data in on

Re: [GENERAL] Basic questions before start

2003-07-30 Thread scott.marlowe
On Wed, 30 Jul 2003, Gogulus wrote: > As the clients should be able to work without network connection, they > have to have a local database, and if net connection is on, do the > synchronization with master db. The main idea is, sale cannot stop > because of net connection breakage. > > That'

Re: [GENERAL] substring implementation (long string)

2003-07-30 Thread Joe Conway
Scott Cain wrote: Thanks--that looks like exactly what I need. Here's a related question: when I do the alter table, is there a way I can make it "retroactive". That is, I ran the alter table, and nothing happened. I expected the storage space for the database to jump, and for it to take a while

Re: [GENERAL] substring implementation (long string)

2003-07-30 Thread Scott Cain
Joe, Thanks--that looks like exactly what I need. Here's a related question: when I do the alter table, is there a way I can make it "retroactive". That is, I ran the alter table, and nothing happened. I expected the storage space for the database to jump, and for it to take a while to do it, b

Re: [GENERAL] Postgres Hanging on Inserts

2003-07-30 Thread Tom Lane
Adam Kavan <[EMAIL PROTECTED]> writes: > I looked into pg_locks and they are all waiting to get an exclusive > lock on the same relation. Is there anyway for me to tell what this > relation is? To decipher the OIDs in pg_locks, join against pg_class.oid, or just do select relname from pg_

Re: [GENERAL] Unused Indexes

2003-07-30 Thread Tim McAuley
Mike Mascari wrote: Tim McAuley wrote: Hi, I have a table which I have populated with over 5000 entries. There is a combined index placed on two of the columns (both bigint). I am trying a simple select (i.e. select id where col1 = 1 and col2 = 1) covering these two columns and it keeps usin

Re: [GENERAL] Unused Indexes

2003-07-30 Thread EDMUND DENGLER
You need to convert the int's to bigints. select id where col1 = 1::bigint and col2 = 1::bigint Regards, Ed -Original Message- From: Tim McAuley <[EMAIL PROTECTED]> Date: Wed, 30 Jul 2003 13:46:46 To:[EMAIL PROTECTED] Subject: [GENERAL] Unused Indexes Hi, I have a table which I have p

Re: [GENERAL] Unused Indexes

2003-07-30 Thread DeJuan Jackson
Assuming you have done a 'VACUUM ANALYZE' on the table in question you are most likely running into a type coercion issue. So explicitly cast your constants to bigint and the index should start being considered. select id from where col2 = 1::bigint and col2 = 1::bigint Tim McAuley wrote: Hi

[GENERAL] Changing DB ownership

2003-07-30 Thread Christopher Murtagh
Dumb question maybe, but how does one change database ownership? I've tried several permutations of: ALTER DATABASE SET ("|'| )owner("|'| ) TO ("|'| )newowner("|'| ); and I tried looking at pg_database and I *was* able to hack this (got a clue half way through writing this email... sorry): UPDA

Re: [GENERAL] SQL SUM query limited by dates

2003-07-30 Thread DeJuan Jackson
use a sub-select SELECT SUM(volume) FROM (SELECT volumn FROM WHERE element = 'name1' ORDER BY date DESC LIMIT 30) t Castle, Lindsay wrote: Hi All, A quick select query I'm having some dramas with; I'm trying to SUM a number of values based on them being the latest entries based on their dat

Re: [GENERAL] Unused Indexes

2003-07-30 Thread Mike Mascari
Mike Mascari wrote: > Tim McAuley wrote: > >>Hi, >> >>I have a table which I have populated with over 5000 entries. There is a >>combined index placed on two of the columns (both bigint). I am trying >>a simple select (i.e. select id where col1 = 1 and col2 = 1) covering >>these two columns and

Re: [GENERAL] Unused Indexes

2003-07-30 Thread Mike Mascari
Tim McAuley wrote: > Hi, > > I have a table which I have populated with over 5000 entries. There is a > combined index placed on two of the columns (both bigint). I am trying > a simple select (i.e. select id where col1 = 1 and col2 = 1) covering > these two columns and it keeps using a seq scan

[GENERAL] Unused Indexes

2003-07-30 Thread Tim McAuley
Hi, I have a table which I have populated with over 5000 entries. There is a combined index placed on two of the columns (both bigint). I am trying a simple select (i.e. select id where col1 = 1 and col2 = 1) covering these two columns and it keeps using a seq scan. Is this correct? I would

Re: [GENERAL] ERROR STRINGS IN PGSQL

2003-07-30 Thread Peter Eisentraut
Deepa K writes: > Is proper error numbers are defined for all > error strings returned by pgsql c library. No, you will have to wait for version 7.4 for that. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if post

[GENERAL] ERROR STRINGS IN PGSQL

2003-07-30 Thread Deepa K
Hi All, Is proper error numbers are defined for all error strings returned by pgsql c library. Is so, where can I get those error numbers and is it possible to return error strings using error numbers. regards, Deepa K. ---(end of broadcast)---

Re: [GENERAL] PostgreSQL consultant

2003-07-30 Thread Devrim GUNDUZ
Hi, On Wed, 30 Jul 2003, Kaare Rasmussen wrote: > I tried to find the page with PostgreSQL consultants. After 10 minutes I gave > up. > > I believe that I've heard that there is such a page, but maybe I'm wrong? Or > maybe I just suck at searching the PostgreSQL site ? http://techdocs.Postgr

[GENERAL] PostgreSQL consultant

2003-07-30 Thread Kaare Rasmussen
Hi I tried to find the page with PostgreSQL consultants. After 10 minutes I gave up. I believe that I've heard that there is such a page, but maybe I'm wrong? Or maybe I just suck at searching the PostgreSQL site ? -- Kaare Rasmussen--Linux, spil,--Tlf:3816 2582 Ka