Re: [GENERAL] Help with tools...

2005-02-23 Thread Jason Earl
"Cristian Prieto" <[EMAIL PROTECTED]> writes: > I've tryied with some tools as pgEditor and EMS PostgreSQL Manager, > but I need a really good pgsql and database Editor to use in Linux > or Windows. Options? Have you take a look at pgAdmin III? http://www.pgadmin.org/ What sort of features are

[GENERAL] Pg 8.0rc5 to 8.0.1 update

2005-02-23 Thread Ben Trewern
Hi, Just a quick question. Do I need to do an initdb to upgrade a cluster from v8.0rc5 to v8.0.1 or can I just do a make install. TIA Ben ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[GENERAL] Help with tools...

2005-02-23 Thread Cristian Prieto
I've tryied with some tools as pgEditor and EMS PostgreSQL Manager, but I need a really good pgsql and database Editor to use in Linux or Windows. Options?

[GENERAL] maximum size

2005-02-23 Thread Molinet Sylviane
Hello, could you be so kind to help me with following requests ? I need the maximum size of the following types : varchar(n) numeric(n,p) text bytea Could you please give me the name of articles or publications and where I can find it for these requests ? I want to transfer a oracle database 8i t

[GENERAL] Tracking down cause of duplicated oid in table.

2005-02-23 Thread Jared Carr
We have a table that we use to store aggregated data, nightly we add a row for the previous day, and update all the rows in the table with the new information. The table is then vacuumed full. Our setup is: Linux Kernel 2.6.4 SCSI Drives Hardware Raid 10 (4 Drives) Reiserfs PostgreSQL 7.4.5 The ta

pgsql-general@postgresql.org

2005-02-23 Thread Vivek Khera
max out your checkpoint_segments. 128 or 256 is good if you have plenty of spare space for the pg_xlog directory. you will also want to increase checkpoint_timeout to something large. I like 900 seconds personally. if you can put pg_xlog on a separate physical RAID you're best off. increase t

Re: [GENERAL] Recovering db from cracked server

2005-02-23 Thread Don Doumakes
Richard Huxton wrote: > You're close - the only thing it was complaining about was the missing > "postgres" database. That's because it defaults to using the same > database as the username. Try >postgres -D copy_of_old_data_dir template1 > > Or use the name of your old database. Woohoo! Th

[GENERAL] Seguimos buscando webdeveloper...

2005-02-23 Thread Cristian Prieto
Aunque parezca increible, seguimos buscando webdeveloper, se ofrece buen sueldo y excelente ambiente de trabajo. Patojo, vos me dijiste que tenias a alguien, que paso? Si alguien mas esta interesado (el sueldo es en $) porfavor, porfavor, envienme un correo...   Xaludos...

Re: [GENERAL] Emacs and postgres

2005-02-23 Thread Greg Stark
Sean Davis <[EMAIL PROTECTED]> writes: > This is a bit off-topic > > Does anyone know of an interface between emacs and psql? I currently use it > as > my default editor and do my share of save and then \i. I just gave pgEdit a > try and liked many aspects of it, but I still like Emacs as

[GENERAL] multiple runs of the same query cause out of memory - WAS [Re: capturing/viewing sort_mem utilization on a per query basis]

2005-02-23 Thread Lonni J Friedman
List & Tom, Following up on this thread from a weeks ago: http://archives.postgresql.org/pgsql-general/2005-02/msg00106.php We have found that this query can indeed cause terrible things to happen to postgresql - it can run several times with response times of a few seconds, and then the next time

Re: [GENERAL] multiple runs of the same query cause out of memory - WAS [Re: capturing/viewing sort_mem utilization on a per query basis]

2005-02-23 Thread Lonni J Friedman
On Wed, 23 Feb 2005 19:56:56 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: > Lonni J Friedman <[EMAIL PROTECTED]> writes: > > We have found that this query can indeed cause terrible things to > > happen to postgresql - it can run several times with response times of > > a few seconds, and then the nex

Re: [GENERAL] multiple runs of the same query cause out of memory - WAS [Re: capturing/viewing sort_mem utilization on a per query basis]

2005-02-23 Thread Tom Lane
Lonni J Friedman <[EMAIL PROTECTED]> writes: > We have found that this query can indeed cause terrible things to > happen to postgresql - it can run several times with response times of > a few seconds, and then the next time cause postgres to go out of > control on memory usage. (I've had to rebo

Re: [GENERAL] ideally a non-volatile function?

2005-02-23 Thread Florian G. Pflug
Noel Whelan wrote: The information on what 'volatile' indicates with a function includes the following: 'VOLATILE indicates that the function value can change even within a single table scan, so no optimizations can be made. Relatively few database functions are volatile in this sense; some example

Re: [GENERAL] [PATCHES] A way to let Vacuum warn if FSM settings are low.

2005-02-23 Thread Tom Lane
Ron Mayer <[EMAIL PROTECTED]> writes: > +if (needed > MaxFSMPages) > +ereport(WARNING, > +(errmsg("max_fsm_pages(%d) is smaller than total pages > needed(%.0f)", > + MaxFSMPages, needed))); An unconditional WARNING seems a bit strong to me for a case that is no

Re: [GENERAL] stats collector appears to be dying

2005-02-23 Thread Tom Lane
Shelby Cain <[EMAIL PROTECTED]> writes: > I'm having an issue with what appears to be the stats > collector process dying on Postgresql 8.0.1 running on > Windows XP w/sp1. > 2005-02-23 14:59:17 FATAL: could not read from statistics collector pipe: No > such file or directory > 2005-02-23 14:59:

Re: [GENERAL] view/pgpgsql functions bug

2005-02-23 Thread Tom Lane
Joe Maldonado <[EMAIL PROTECTED]> writes: > After a create or replace view, the new view definition is not being > used by plpgsql functions that use the view. Is this a known bug ? Is > there a workaround it ? Start a fresh backend session. The old query plan is presumably being cached by plpgsq

Re: [GENERAL] Emacs and postgres

2005-02-23 Thread Randal L. Schwartz
> "Sean" == Sean Davis <[EMAIL PROTECTED]> writes: Sean> Does anyone know of an interface between emacs and psql? I currently Sean> use it as my default editor and do my share of save and then \i. I Sean> just gave pgEdit a try and liked many aspects of it, but I still like Sean> Emacs as an

Re: [GENERAL] library files

2005-02-23 Thread Guy Rouillier
Mohsen Pahlevanzadeh wrote: > Dears,Now i can't link any library to my executable file,Please guide > me that i can use mysql along with pgsql.(mysql needs to add library > to executable file) Yours,Mohsen Have you read the section of the documentation dealing with building C programs to talk wi

[GENERAL] A way to let Vacuum warn if FSM settings are low.

2005-02-23 Thread Ron Mayer
Short summary: I find this tiny (9-line) patch useful to help my clients know when FSM settings may need updating. Some of the more frequently asked questions here are in regards to FSM settings. One hint I've seen is to run "vacuum verbose;". At the end of thousands of lines of INFO and

Re: [GENERAL] Emacs and postgres

2005-02-23 Thread Joe Healy
Joe Healy wrote: Sean Davis wrote: This is a bit off-topic Does anyone know of an interface between emacs and psql? I currently use it as my default editor and do my share of save and then \i. I just gave pgEdit a try and liked many aspects of it, but I still like Emacs as an editor and wo

[GENERAL] library files

2005-02-23 Thread Mohsen Pahlevanzadeh
Dears,Now i can't link any library to my executable file,Please guide me that i can use mysql along with pgsql.(mysql needs to add library to executable file) Yours,Mohsen ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose

Re: [GENERAL] PQsetdb

2005-02-23 Thread Stephan Szabo
On Wed, 23 Feb 2005, Mohsen Pahlevanzadeh wrote: > pgsql_LIBS=-L/usr/lib You need to specify to link to an actual library here (probably -lpq at least). Just giving a library directory isn't going to be good enough. ---(end of broadcast)--- TIP 4

Re: [GENERAL] stats collector appears to be dying

2005-02-23 Thread Shelby Cain
--- "Matthew T. O'Connor" wrote: > Windows firewall perhaps? > I double checked to make sure it was disabled. Regardless, if a firewall were preventing the connection from occuring I'm fairly certain the error would be something other than "target machine actively refused" which implies tryin

Re: [GENERAL] PQsetdb

2005-02-23 Thread Mohsen Pahlevanzadeh
My Makefile is : mysql_INCS=-I/usr/include/mysql pgsql_INCS=-I/usr/include pgsql_LIBS=-L/usr/lib mysql_LIBS=-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm CXX=g++ sql2sql : sql2sql.o $(CXX) $(mysql_LIBS) $(pgsql_LIBS) -o sql2sql sql2sql.o ; rm -rf sql2sql.o ; sql2sql.o : sql2s

Re: [GENERAL] Emacs and postgres

2005-02-23 Thread John DeSoi
Hi Sean, On Feb 23, 2005, at 4:19 PM, Sean Davis wrote: Does anyone know of an interface between emacs and psql? I currently use it as my default editor and do my share of save and then \i. I just gave pgEdit a try and liked many aspects of it, but I still like Emacs as an editor and wondered

Re: [GENERAL] Emacs and postgres

2005-02-23 Thread Joe Healy
Sean Davis wrote: This is a bit off-topic Does anyone know of an interface between emacs and psql? I currently use it as my default editor and do my share of save and then \i. I just gave pgEdit a try and liked many aspects of it, but I still like Emacs as an editor and wondered if anyone

Re: [GENERAL] PQsetdb

2005-02-23 Thread Stephan Szabo
[EMAIL PROTECTED] On Wed, 23 Feb 2005, Mohsen Pahlevanzadeh wrote: > If you see my orginal email,I mentioned to link to inc & lib for > pgsql.Even when i use PQsetdb,I didn't recieve error message for using > PQsetdb. The fragment of execution of make you gave had no mention of them in the comm

Re: [GENERAL] stats collector appears to be dying

2005-02-23 Thread Matthew T. O'Connor
Windows firewall perhaps? Shelby Cain wrote: I'm having an issue with what appears to be the stats collector process dying on Postgresql 8.0.1 running on Windows XP w/sp1. I've enabled stats_command_string and stats_row_level in my config file. During bulk inserts the stats collector process appe

Re: [GENERAL] PQsetdb

2005-02-23 Thread Mohsen Pahlevanzadeh
If you see my orginal email,I mentioned to link to inc & lib for pgsql.Even when i use PQsetdb,I didn't recieve error message for using PQsetdb. Yours,Mohsen > > On Wed, 23 Feb 2005, Mohsen Pahlevanzadeh wrote: > >> My program is using both MySQL & PostgreSQL.I don't have problem with >> Mysql.But

Re: [GENERAL] PQsetdb

2005-02-23 Thread Guy Rouillier
Mohsen Pahlevanzadeh wrote: > My program is using both MySQL & PostgreSQL.I don't have problem with > Mysql. But i have problem with pgsql. I think Richard's point is that you are not linking in any PostgreSQL libs. >> Mohsen Pahlevanzadeh wrote: >>> I recieve following error: >>> [EMAIL PROTE

Re: [GENERAL] PQsetdb

2005-02-23 Thread Stephan Szabo
On Wed, 23 Feb 2005, Mohsen Pahlevanzadeh wrote: > My program is using both MySQL & PostgreSQL.I don't have problem with > Mysql.But i have problem with pgsql. That could be because you don't appear to be linking to the PostgreSQL libraries (as Richard was hinting at). > > Mohsen Pahlevanzadeh

[GENERAL] stats collector appears to be dying

2005-02-23 Thread Shelby Cain
I'm having an issue with what appears to be the stats collector process dying on Postgresql 8.0.1 running on Windows XP w/sp1. I've enabled stats_command_string and stats_row_level in my config file. During bulk inserts the stats collector process appears to encounter some sort of problem and sh

[GENERAL] Emacs and postgres

2005-02-23 Thread Sean Davis
This is a bit off-topic Does anyone know of an interface between emacs and psql? I currently use it as my default editor and do my share of save and then \i. I just gave pgEdit a try and liked many aspects of it, but I still like Emacs as an editor and wondered if anyone else has tricks/pl

Re: [GENERAL] ADO and timestamp/date errors

2005-02-23 Thread Jonel Rienton
Hi Craig, Out of curiosity, beside portability, why haven't you use Npgsql? regards, - Jonel Rienton http://blogs.road14.com Software Developer, *nix Advocate On Feb 23, 2005, at 1:48 PM, Craig Bryden wrote: Hi Shachar Unfortunately due to a Non disclose agreement that I have on the project,

Re: [GENERAL] PQsetdb

2005-02-23 Thread Mohsen Pahlevanzadeh
My program is using both MySQL & PostgreSQL.I don't have problem with Mysql.But i have problem with pgsql. > Mohsen Pahlevanzadeh wrote: >> I recieve following error: >> [EMAIL PROTECTED] sql2sql]# make >> g++ -c -I/usr/include/mysql -I/usr/include sql2sql.cpp; > ^^ >>

Re: [GENERAL] PQsetdb

2005-02-23 Thread Richard Huxton
Mohsen Pahlevanzadeh wrote: I recieve following error: [EMAIL PROTECTED] sql2sql]# make g++ -c -I/usr/include/mysql -I/usr/include sql2sql.cpp; ^^ g++ -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -o ^ ^^^ Those aren't goi

[GENERAL] PQsetdb

2005-02-23 Thread Mohsen Pahlevanzadeh
Dears,I have added following constructor to my class: class CPgsql : public CCore { public: char *pghost, *pgport, *pgoptions, *pgtty; char *dbName; PGconn *connection2db; const char * conninfo;

Re: [GENERAL] ADO and timestamp/date errors

2005-02-23 Thread Craig Bryden
Hi Shachar Unfortunately due to a Non disclose agreement that I have on the project, I cannot send the whole table creation statement. But I have included some fields below: CREATE TABLE tb_Player ( PlayerID SERIAL NOT NULL PRIMARY KEY , Firstname varchar (100) NOT NULL , Lastname varchar (100)

[GENERAL] view/pgpgsql functions bug

2005-02-23 Thread Joe Maldonado
After a create or replace view, the new view definition is not being used by plpgsql functions that use the view. Is this a known bug ? Is there a workaround it ? For instance, selecting from afunc() still returns the old view's results. create table c ( a int ); create or replace view a as select

Re: [GENERAL] Store procedure -------------- !!!!!!!!!!!!!! URGENTE """""""""""""""

2005-02-23 Thread javier wilson
i guess you can create a simple sql function: http://www.postgresql.org/docs/8.0/interactive/xfunc-sql.html or more complex pl/pgsql functions http://www.postgresql.org/docs/8.0/interactive/xplang.html On Tue, 22 Feb 2005 14:37:21 -0300, Adelson - Informática <[EMAIL PROTECTED]> wrote: > > Por f

Re: [GENERAL] reltuples < # of rows

2005-02-23 Thread Tom Lane
Eric Brown <[EMAIL PROTECTED]> writes: > I thought that the number of tuples in a table must be greater than the > number of rows? For one of my tables, I have the following: > # analyze t_stats; > ANALYZE > siteserverdb=# select reltuples, relpages from pg_class where relname = > 't_stats'; >

[GENERAL] Rephrased: Possible to run the server without backslash (C-style) escaping?

2005-02-23 Thread Ken Johanson
More specifically, I'd like to disable the non-standard backslash escaping behavior of the server, so that backslashes aren't discarded, like: insert into table values ('This won''t work when inserting a \ character'); -> 'This won't work when inserting a character' Instead I'd like for only singl

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Pavel Stehule
On Wed, 23 Feb 2005, Cristian Prieto wrote: > RETURNS SETOF Users gave me: > > getuser > - > (cristian,hola) > Yes, it's ok, but for SETOF function You have to use different style of calling SELECT * FROM getuser(...). If function call in normal centext then SRF function

[GENERAL] reltuples < # of rows

2005-02-23 Thread Eric Brown
I thought that the number of tuples in a table must be greater than the number of rows? For one of my tables, I have the following: # analyze t_stats; ANALYZE siteserverdb=# select reltuples, relpages from pg_class where relname = 't_stats'; reltuples | relpages ---+-- 1760

[GENERAL] equivalent in postgres of over(partition) function in db2

2005-02-23 Thread vinita bansal
Hi, I have the following query in db2: "insert into xyz (a,b) select 10, MIN(CM_LEDGERITEM.tril_gid) OVER(PARTITION BY CM_LEDGERITEM.MMPAYEE, CM_PROMOTION.MMCOMPTYPE, CM_LEDGERITEM.MODEL) from " I am not able to find a corresponding thing for min(...) over(partition by col1, col2, col3..) i

Re: [GENERAL] Recovering db from cracked server

2005-02-23 Thread Tom Lane
"Don Doumakes" <[EMAIL PROTECTED]> writes: > latest version of postgresql is incompatible with 7.2.x, so I compiled > postgresql-7.2.7 and attempted to run > postgres -D copy_of_old_data_dir You probably wanted to say "postmaster" not "postgres". The quoted result is about what I'd expect from

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Cristian Prieto
RETURNS SETOF Users gave me: getuser - (cristian,hola) - Original Message - From: "Richard Huxton" To: "Pavel Stehule" <[EMAIL PROTECTED]> Cc: "Cristian Prieto" <[EMAIL PROTECTED]>; Sent: Wednesday, February 23, 2005 10:34 AM Subject: Re: [GENERAL] Help with a very n

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Richard Huxton
Pavel Stehule wrote: If I did the following: SELECT * FROM "Users"; I get: userid | passwd --+ cristian | hola AND I execute: SELECT getuser('cristian', 'hola'); I get: getuser - (cristian,hola) There are two posibilities SELECT getuser('cristian','hola'); SELEC

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Pavel Stehule
> > If I did the following: > SELECT * FROM "Users"; > I get: > > userid | passwd > --+ > cristian | hola > > AND I execute: > SELECT getuser('cristian', 'hola'); > > I get: > getuser > - > (cristian,hola) > There are two posibilities SELECT getuser('cr

[GENERAL] Possible to run the server with ANSI/ISO string escapeing instead of C-style escapes?

2005-02-23 Thread Ken Johanson
Greetings, Does anyone know if it will be possible to run the server with ANSI/ISO string escaping instead of C-style escapes? The C style escaping is a shoot-down for our adoption of postgres, since its non-standard. Thanks, ken ---(end of broadcast)

Re: [GENERAL] Simple client messages from within pgPL/SQL

2005-02-23 Thread Andre Schnoor
> This may be too simplistic an answer, but can't you just have the function > return a text string and return the message you want to deliver back to the > client? Thanks for your reply. However, this won't work because the INFO messages are not the result or the function. They are a notification

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Cristian Prieto
In my table userid | passwd --+ cristian | hola If I did the following: SELECT * FROM "Users"; I get: userid | passwd --+ cristian | hola But If I create the following Function CREATE OR REPLACE FUNCTION getuser(varchar, varchar) RETURNS SETOF RECORD AS $body$

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Jan Poslusny
1. Plpgsql-function can return record (or set of records). Sql-function returns result of the last query in it's body. 2. I prefer simple solutions, though I write sql-functions whenever requirement likes as "parametrized view". But I know that in some special situations plpgsql-function with cle

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Cristian Prieto
Well, I will ask a little more clear: 1. A function could be declare to return a RECORD value? (the manual doesn't put it so clear, mention only simple return values and declaration values, not return values). 2. It will be better declare that function as a parametrized view or as a pgsql functi

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Jan Poslusny
I think that sql-functions may serve as parametrized views for you... http://www.postgresql.org/docs/8.0/static/xfunc-sql.html Cristian Prieto wrote: I want to create a view or a sp which returns NULL if nothing is found and a recordset if the user is found I wrote something like: CREATE sp_ge

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Sean Davis
On Feb 23, 2005, at 6:14 AM, Andre Schnoor wrote: CREATE sp_getuser(name, pass) RETURNS record AS $body$ DECLARE retval RECORD; BEGIN SELECT INTO retval * FROM Users WHERE userid=name AND passwd=pass; IF NOT FOUND THEN RETURN NULL; ELSE RETURN retval; END; $body$ LAN

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Andre Schnoor
>>> I wrote something like: CREATE sp_getuser(name, pass) RETURNS record AS $body$ DECLARE retval RECORD; BEGIN SELECT INTO retval * FROM Users WHERE userid=name AND passwd=pass; IF NOT FOUND THEN RETURN NULL; ELSE RETURN retval; END; $body$ LANGUAGE plpgsql; What

Re: [GENERAL] Catching internal error ID's to throw custom errors.

2005-02-23 Thread Richard Huxton
[EMAIL PROTECTED] wrote: I have a lot of plpgsql functions and I would like to catch the original postgresql error and, based on that value, to throw with a raise or something my custom error. The section "Trapping Errors" in the plpgsql chapter of the manuals covers this. Does this not do what yo

[GENERAL] Catching internal error ID's to throw custom errors. Is it possib le in PostGreSQL?

2005-02-23 Thread Stefan . Ardeleanu
Title: Catching internal error ID's to throw custom errors. Is it possible in PostGreSQL? I have a lot of plpgsql functions and I would like to catch the original postgresql error and, based on that value, to throw with a raise or something my custom error. In SQL Server, for example, I have t

Re: [GENERAL] Simple client messages from within pgPL/SQL

2005-02-23 Thread Terry Lee Tucker
This may be too simplistic an answer, but can't you just have the function return a text string and return the message you want to deliver back to the client? On Wednesday 23 February 2005 05:00 am, Andre Schnoor saith: > > I'm desparately seeking for a simple way to send messages to the client

Re: [GENERAL] Simple client messages from within pgPL/SQL

2005-02-23 Thread Andre Schnoor
> I'm desparately seeking for a simple way to send messages to the client > during the execution of large stored procedures. > > RAISE INFO 'Now Processing %', thisCustomer; > > Doesn't do it, because the client console is cluttered with verbose context > information (e.g. backtrace). It's imposs

Re: [GENERAL] tsearch2 problems / limitations

2005-02-23 Thread Michael Fuhr
On Tue, Feb 22, 2005 at 01:29:45PM +, James Croft wrote: > One of the tables holds reasonable amounts of text, some fields hold up > to 2Mb. When I try and run > > UPDATE table SET idxfti=to_tsvector('default', field); > > it runs for a while then aborts with the following message > > ERRO

Re: [GENERAL] Different execution time from psql and JDBC

2005-02-23 Thread Andreas Hartmann
Richard Huxton wrote: Andreas Hartmann wrote: Dear postgresql community, I have a quite complex statement. When I execute it directly via psql, the execution time is approx. 2000 ms. When I execute it via JDBC (Apache Cocoon), the execution time is either 600..1000 ms or approx. 10.000 ms, based on

Re: [GENERAL] Recovering db from cracked server

2005-02-23 Thread Richard Huxton
Don Doumakes wrote: I own a server that was recently cracked by, I presume, an incompetent script kiddie. Minutes after he bravely tagged the web site, the server went down hard and would not boot. I've built a new system. I need to recover a postgresql 7.2 database from the old hard drive, which

Re: [GENERAL] Different execution time from psql and JDBC

2005-02-23 Thread Richard Huxton
Andreas Hartmann wrote: Dear postgresql community, I have a quite complex statement. When I execute it directly via psql, the execution time is approx. 2000 ms. When I execute it via JDBC (Apache Cocoon), the execution time is either 600..1000 ms or approx. 10.000 ms, based on a certain value in a

Re: [GENERAL] tsearch2 problems / limitations

2005-02-23 Thread Oleg Bartunov
On Tue, 22 Feb 2005, James Croft wrote: Hi, I've successfully added tsearch2 to an existing database and the speedup of searches is brilliant. I'm now trying to extend this to other parts of our system. One of the tables holds reasonable amounts of text, some fields hold up to 2Mb. When I try a