Re: [GENERAL] Recovering a broken database

2005-06-30 Thread Ciprian Popovici
Oh, and FWIW, when I try a pg_dump on the database "recovered" with pg_resetxlog, I get this: pg_dump: missing pg_database entry for database "db" -- Ciprian Popovici ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL

Re: [GENERAL] Memory tuning for linux (Suffering CRS...)

2005-06-30 Thread Kim Bisgaard
Try this: http://www.powerpostgresql.com/Downloads/annotated_conf_80.html Peter L. Berghold wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Folks, I remember seeing somewhere a document that outlined how to tune memory for optimal operation of a postgres server on Linux. I can't seem to

[GENERAL] Possible move away from PG

2005-06-30 Thread Jason Tesser
I work for a college and we use PG currently as our main backend. We are currently developing with Java. We are considering moving away from postgres for the reasons I am going to list below. I would appreciate some thoughts from the Postgres community on way we should or shouldn't leave postgre

[GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Jason Tesser
I work for a college and we use PG currently as our main backend. We are currently developing with Java. We are considering moving away from postgres for the reasons I am going to list below. I would appreciate some thoughts from the Postgres community on way we should or shouldn't leave post

Re: [GENERAL] Possible move away from PG

2005-06-30 Thread Kris Jurka
On Thu, 30 Jun 2005, Jason Tesser wrote: > 1. Our dev plan involves alot of stored procedures to be used and we > have found the way this is done in PG to be painful. (ie. To return > multiple record from different tables you have to define a type. This > is a pain to maintain because if you e

Re: [GENERAL] PostgreSQL's vacuumdb fails to allocate memory for non-root users

2005-06-30 Thread Charles Swiger
On Jun 29, 2005, at 4:12 PM, Sven Willenberger wrote: [ ... ] Something I have noticed, when the memory error occurs during the psql session (after a failed vacuumdb attempt) the memory stays at 600+MB in top (under size) until the psql session is closed -- that may just be the way top reports it

Re: [GENERAL] Recovering a broken database

2005-06-30 Thread Tom Lane
Ciprian Popovici <[EMAIL PROTECTED]> writes: > Come to think of it better, at some point I might've switched > repositories with 8.0 still running. Hmm, you mean you renamed the 8.0 directory tree out of the way and then moved the 7.4 tree where it had been, without stopping the 8.0 postmaster? O

Re: [GENERAL] Possible move away from PG

2005-06-30 Thread Jason Tesser
I am not familar with how to do this. Could you give me an example of how this could help? > > Have you considered returing refcursors instead of setof some type. > > Kris Jurka -- Jason Tesser Developer for NMI [EMAIL PROTECTED] Eph 2:8-10 ---(end of broadcast)--

Re: [GENERAL] Explain Analyse never returns .. maybe a bug

2005-06-30 Thread David Gagnon
Oups ! Sorry I misunderstanding the command .. always thought it was almos instantaneous my mistake.. really sorry about that Thanks :-) /David Sean Davis wrote: - Original Message - From: "David Gagnon" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, June 29, 2005 9:25 AM Subject:

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Tom Lane
Jason Tesser <[EMAIL PROTECTED]> writes: > 1. Our dev plan involves alot of stored procedures to be used and we have > found the way this is done in PG to be painful. (ie. To return multiple > record from different tables you have to define a type. FWIW, this won't be essential any more in 8.1.

[GENERAL] Error while installing Slony 1.1.0 for PostGreSql version 7.3.4

2005-06-30 Thread Ajay Dalvi
Hello All, I am from India - Pune I have PostGreSql 7.3.4 installed on RedHat Linux 9. I want to do the Replication on PostGreSql databases I am going to use Slony 1.1.0 for Replication. I am follwing the installation steps that are given in Slony-I-Install.txt in Slony 1.1.0 source. But w

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Jason Tesser
HI On Thursday 30 June 2005 9:20 am, Tom Lane wrote: > Jason Tesser <[EMAIL PROTECTED]> writes: > > 1. Our dev plan involves alot of stored procedures to be used and we have > > found the way this is done in PG to be painful. (ie. To return multiple > > record from different tables you have to de

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Sven Willenberger
On Thu, 2005-06-30 at 10:18 -0500, Jason Tesser wrote: > HI > > On Thursday 30 June 2005 9:20 am, Tom Lane wrote: > > Jason Tesser <[EMAIL PROTECTED]> writes: > > > 1. Our dev plan involves alot of stored procedures to be used and we have > > > found the way this is done in PG to be painful. (ie.

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Jason Tesser
Can this return multiples? I thought when you dfined columns dynamically like your example it only returns one record and I need to be able to return a set. Can your example return a set? On Thursday 30 June 2005 10:58 am, Sven Willenberger wrote: > If I understand the new features correctly,

[GENERAL] PostgreSQL, WIndows, regular backup

2005-06-30 Thread Zlatko Matić
Hello. I would appreciate if someone helps me to resolve this problem about regular backups on Windows. I have a batch file (.bat) for backup, but don't know how to include timestamp in backup file name. In this way I allways have only one, the most recent, backup file. I want Windows to pro

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Uwe C. Schroeder
I've solved this for my case in 7.4 by defining a view with the desired column layout and the return setof the view. This certainly depends on what you're trying to accomplish. On Thursday 30 June 2005 09:21 am, Jason Tesser wrote: > Can this return multiples? I thought when you dfined columns

Re: [GENERAL] how to use pg_dump and then restored onto development server

2005-06-30 Thread Matt Van Mater
On 6/29/05, Douglas McNaught <[EMAIL PROTECTED]> wrote: > "Zlatko Matic" <[EMAIL PROTECTED]> writes: > > > OK..i get it. It works... > > My additional question is: how to incorporate timestamp in dumped file > > name ? > > Let's say, if we have script: pg_dump -f D:\MYDB_BCP -Fc -c -x -h > > local

Re: [GENERAL] Possible move away from PG

2005-06-30 Thread Pablo Baena
If found this article of help: http://www.onjava.com/pub/a/onjava/2003/08/13/stored_procedures.html?page=2 On 6/30/05, Jason Tesser <[EMAIL PROTECTED]> wrote: I am not familar with how to do this.  Could you give me an example of howthis could help?>> Have you considered returing refcursors instead

Re: [GENERAL] PostgreSQL, WIndows, regular backup

2005-06-30 Thread SCassidy
This works to put the date in the filename on Windows 2000: In a .bat file: @echo off for /f "tokens=1-4 delims=/ " %%i in ("%date%") do ( set dow=%%i set month=%%j set day=%%k set year=%%l ) set datestr=%month%_%day%_%year% echo datestr is %datestr% set B

[GENERAL] Get Query in Statement Level Trigger?

2005-06-30 Thread Derry Bryson
Is it possible to get the text of the query that caused the trigger within a statement level trigger? It looks to me like all you can get is whether it is a an UPDATE, DELETE, or INSERT and not much in the way of details about the what caused the trigger. Thanks, Derry Bryson __

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Marek Lewczuk
Tom Lane napisał(a): Jason Tesser <[EMAIL PROTECTED]> writes: 3. The tools. PgAdmin does some things well but it is lacking the features of some of the other gui tools. I'm sure the pgAdmin guys would love having some more help. What about sqlmanager.net - it the best GUI with number of great

Re: [GENERAL] Possible move away from PG

2005-06-30 Thread Bob
PL/SQL is awesome just awesome no doubt about it.   But if you like to pay at a minium for 5 users 800 bucks then stick with PL/SQL.  I personally can live with pl/psql and at a higher level postgresql to be honest.  Not to mention the rate that things are being added and improved is mind numbing.

Re: [GENERAL] Possible move away from PG

2005-06-30 Thread Jason Tesser
Ok.  This sounds good to me but I have one question>  In the manual for 8.0 with comments someone commented at the end of the section on frecursors that they need to be closed which the manual didn’t seem to mention will this be a problem with doing this in java?    From: Pablo B

Re: [GENERAL] Error while installing Slony 1.1.0 for PostGreSql version 7.3.4

2005-06-30 Thread Vivek Khera
On Jun 30, 2005, at 10:39 AM, Ajay Dalvi wrote: But while installing , during configuration step i am getting an error error: Your version of libpq doesn't have PQunescapeBytea this means that your version of PostgreSQL is lower than 7.3 and thus not supported by Slony-I. Though i a

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Tony Caduto
There are very nice inexpensive alternatives to PG Admin III. Because of it's cross platform nature it is severly lacking in many areas. Check out PG Lightning Admin at: http://www.amsoftwaredesign.com 3. The tools. PgAdmin does some things well but it is lacking the features of some of the

[GENERAL] get the SALT

2005-06-30 Thread Adam O'Toole
I am using VB.NET as a frontend to postGres 7.4. With MD5 authentication, how can I get the SALT value? The ODBC Connection with .NET is like a one step process, the connection string and you just send it with an open() command. Do I need it to be interactive and obtain the salt? Should I use a

[GENERAL] Error while installing Slony 1.1.0 for PostGreSql version 7.3.4

2005-06-30 Thread Ajay Dalvi
Hello All, I am from India - Pune I have PostGreSql 7.3.4 installed on RedHat Linux 9. I want to do the Replication on PostGreSql databases I am going to use Slony 1.1.0 for Replication. I am follwing the installation steps that are given in Slony-I-Install.txt in Slony 1.1.0 source. But

[GENERAL] PostgreSQL sequence within function

2005-06-30 Thread Clark Allan
I am new to Postgre, and am still learning some of the basics... please bare with me. I need to know how to access a sequence from within a function. Let me know whats wrong with the following... (this is not the exact function, just for examples sake...) -

[GENERAL] optimizer not optimizing

2005-06-30 Thread Albert Vernon Smith
I am in process of migrating from Pg 7.4.5 to 8.0.3. I have the same data loaded in to the two. However, when I do a query on my 8.0.3 installation, I am not getting a very well optimized query. (All the memory settings are equivalent.) On 8.0.3, I get the following query plan: dbsnp_b1

Re: [GENERAL] PostgreSQL sequence within function

2005-06-30 Thread Tony Caduto
All you where really mising was a semi colon afer nextval('myseq') and the begin end. CREATE or REPLACE FUNCTION getSeq() RETURNS int AS $$ begin RETURN nextval('myseq'); end; $$ LANGUAGE 'plpgsql'; Clark Allan wrote: -- CREATE FUNCTION getSeq() RET

Re: [GENERAL] optimizer not optimizing

2005-06-30 Thread Joshua D. Drake
Albert Vernon Smith wrote: I am in process of migrating from Pg 7.4.5 to 8.0.3. I have the same data loaded in to the two. However, when I do a query on my 8.0.3 installation, I am not getting a very well optimized query. (All the memory settings are equivalent.) Did you analyze on 8.

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Tom Lane
Sven Willenberger <[EMAIL PROTECTED]> writes: > As far as hard coding the OUT datatypes, if I understand the docs > correctly you can even: > CREATE FUNCTION foo(IN i int, OUT x anyelement, OUT y anyelement, OUT z > anyelement) AS ... That exact example would not work --- anyelement/anyarray is al

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Tom Lane
Jason Tesser <[EMAIL PROTECTED]> writes: > I might be missing it but how does this help me. What I would like is to be > able to return multiple records from a select statement that return multiple > columns from different tables without having to create a type. You mean like this? regression=

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Dawid Kuroczko
On 6/30/05, Jason Tesser <[EMAIL PROTECTED]> wrote: > I work for a college and we use PG currently as our main backend. We are > currently developing with Java. We are considering moving away from postgres > for the reasons I am going to list below. I would appreciate some thoughts > from the Po

Re: [GENERAL] Error while installing Slony 1.1.0 for PostGreSql version 7.3.4

2005-06-30 Thread Chris Browne
[EMAIL PROTECTED] (Ajay Dalvi) writes: > [EMAIL PROTECTED] slony1-1.1.0]# ./configure --with-pgconfigdir=/usr/bin > checking build system type... i686-pc-linux-gnu ... > checking for pg_config... /usr/bin/pg_config > checking for correct version of PostgreSQL... 7.3 > checking for PQunescapeBytea i

Re: [GENERAL] Recovering a broken database

2005-06-30 Thread Ciprian Popovici
On Thu, 30 Jun 2005 09:11:13 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: > But congratulations on finding an entirely new way around the > safety interlocks that are intended to prevent this sort of > disaster. We shall have to think about whether we can fix that. Glad to be of help, whatever way t

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Jason Tesser
That is very similar to what I have been trying to do. I have 1 question and one problem though. Question: DO I have to define every column I am returning as an out going parameter? Problem I ran your test and I am getting as error see below test=# create function countum(lim int, out n int,

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Tom Lane
"Jason Tesser" <[EMAIL PROTECTED]> writes: > Problem I ran your test and I am getting as error see below This is an 8.1 feature not something that exists in current releases. regards, tom lane ---(end of broadcast)--- TIP 7:

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Jason Tesser
OK I am an idiot you are running a cvs build I guess. Which at least answers the problem. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Jason Tesser
Yes I figured it out could I bug one last time about my question :-) Question: DO I have to define every column I am returning as an out going parameter? You have been helpful Tom and I really do appreciate it. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Thursday

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Tom Lane
"Jason Tesser" <[EMAIL PROTECTED]> writes: > Question: DO I have to define every column I am returning as an out > going parameter? Well, yes, where else is the system going to get the information? regards, tom lane ---(end of broadcast)--

[GENERAL] How to know if a TRANSACTION isn't completed

2005-06-30 Thread MargaretGillon
I am trying to adapt a class to Postgresql that was written for SQLServer. As an error check the class counts open transactions to make sure all previous transactions have been completed. In SQLServer there is a command @@TRANCOUNT which tells how many transactions are open on the server for the

[GENERAL] Transparent i18n?

2005-06-30 Thread Steve - DND
I've recently been trying to implement some i18n functionality as simply as possible into my application. I have a lot of lookup values and such in the DB that need to be translated, and I would rather not do it in the calling client. A friend and I put our heads together, and came up which seemed

Re: [GENERAL] Advice on structure /sequence / trigger

2005-06-30 Thread David Pratt
Hi Greg. Sorry for getting back to you so late on this. I think your idea on the design is spot on since it will give me referential integrity with my other and the multi-language will just be a simple two field table with id and multi-dimensional array of language codes to string. Super idea

Re: [GENERAL] How to know if a TRANSACTION isn't completed

2005-06-30 Thread Neil Conway
[EMAIL PROTECTED] wrote: Is there a similar command in Postgresql so that the client application can find out if there's an unresolved transaction before it starts a new one? See PQtransactionStatus() in libpq; if you're using a different language interface, it should provide some means to ge

Re: [GENERAL] optimizer not optimizing

2005-06-30 Thread Albert Vernon Smith
Yes, I did an analyze, and see this behavior. -albert On 30.6.2005, at 20:39, Joshua D. Drake wrote: Albert Vernon Smith wrote: I am in process of migrating from Pg 7.4.5 to 8.0.3. I have the same data loaded in to the two. However, when I do a query on my 8.0.3 installation, I am no

Re: [GENERAL] Transparent i18n?

2005-06-30 Thread David Pratt
Hi Steve. I have been a bit puzzling over a similar issue - not i18 for interface but for text data and trying to sort out a solution so I will be interested to hear additional advice as well. When I wrote to the list a couple of weeks back (look for my posting around the 17th) I was looking

[GENERAL] Check constraint problem

2005-06-30 Thread Michael Schmidt
New to PostgreSQL and hoping for some help with a constraint I've been struggling with for a could of days.  The table includes means and standard deviations.  They should either both be null or (mean any value and standard deviation >= 0)   The constraint statement:   ALTER TABLE "ClinData"

Re: [GENERAL] Check constraint problem

2005-06-30 Thread Michael Glaesemann
On Jul 1, 2005, at 12:04 PM, Michael Schmidt wrote: The constraint statement: ALTER TABLE "ClinData" ADD CONSTRAINT "Control_Score" CHECK ((("Control_Score_M" IS NULL) AND ("Control_Score_SD" IS NULL) ) OR (("Control_Score_M" IS NOT NULL) AND ("Control_Score_SD" >= 0.0))) This statement execu

Re: [GENERAL] Check constraint problem

2005-06-30 Thread Tom Lane
"Michael Schmidt" <[EMAIL PROTECTED]> writes: > ALTER TABLE "ClinData" ADD CONSTRAINT "Control_Score" CHECK > ((("Control_Score_M" IS NULL) AND ("Control_Score_SD" IS NULL) ) OR > (("Control_Score_M" IS NOT NULL) AND ("Control_Score_SD" >= 0.0))) > This statement executes okay. It prevents Cont

Re: [GENERAL] [ANNOUNCE] Language to use with SQL database - Number ONE computer

2005-06-30 Thread Marc G. Fournier
For those that remember far enough back, you will have *cough* fond memories of Al Dev ... he seems to have resurfaced, and I figured that this "enlightened posting" might be a nice end to a week for some :) On Thu, 30 Jun 2005, Al_Dev wrote: Since PostgreSQL, MySQL is written in "C", th

Re: [GENERAL] PostgreSQL sequence within function

2005-06-30 Thread Russ Brown
Tony Caduto wrote: > All you where really mising was a semi colon afer nextval('myseq') and > the begin end. > > CREATE or REPLACE FUNCTION getSeq() > RETURNS int AS > $$ > begin > RETURN nextval('myseq'); > end; > $$ > LANGUAGE 'plpgsql'; > > Clark Allan wrote: > This just made me think. If I

Re: [GENERAL] COnsidering a move away from Postgres

2005-06-30 Thread Russ Brown
Tony Caduto wrote: > There are very nice inexpensive alternatives to PG Admin III. Because > of it's cross platform nature it is severly lacking in many areas. > In what way does making software cross-plaform cause it to be 'lacking in many areas'? > Check out PG Lightning Admin at: > http://ww