Re: [HACKERS] [GENERAL] New project launched : PostgreSQL GUI

2006-01-31 Thread A. Kretschmer
am 31.01.2006, um 8:46:44 +0100 mailte Tino Wildenhain folgendes: Jonah H. Harris schrieb: I had to deal with an installer written in python and several in Java... IMHO, Java would be a better language for this and you could build off some nice OSS installers that already exist (such as

Re: [GENERAL] New project launched : PostgreSQL GUI

2006-01-31 Thread Thomas Hallgren
Tino Wildenhain wrote: Jonah H. Harris schrieb: I had to deal with an installer written in python and several in Java... IMHO, Java would be a better language for this and you could build off some nice OSS installers that already exist (such as IzPack). Just my 2 cents :) Yes! Use Java for

Re: [GENERAL] [HACKERS] New project launched : PostgreSQL GUI Installer for

2006-01-31 Thread Devrim GUNDUZ
Hi, On Tue, 2006-01-31 at 08:34 +0100, Tino Wildenhain wrote: http://pgfoundry.org/projects/pgnixinstaller/ We are actively looking for developers for the project. Please drop me an e-mail if you want to join this project. We will use Python, so you need to be a Python guy to join

Re: [GENERAL] New project launched : PostgreSQL GUI Installer for

2006-01-31 Thread Devrim GUNDUZ
Hi, On Tue, 2006-01-31 at 08:36 +0100, Tino Wildenhain wrote: Are you going to work with the underlying system's package manager, or put everything in /usr/local? We'll work with the package manager -- I'm an RPM guy ;) RPM isnt the only packaging system out there ;) I used RPM as

Re: [GENERAL] [HACKERS] New project launched : PostgreSQL GUI

2006-01-31 Thread Devrim GUNDUZ
Hi, On Mon, 2006-01-30 at 22:45 -0500, Vivek Khera wrote: However none of them are PostgreSQL Installers, none of them has the ability to customize the packages and none of them has the ability to install the community packages, etc. :) You need to take a sniff over at the FreeBSD

Re: [HACKERS] [GENERAL] New project launched : PostgreSQL GUI

2006-01-31 Thread Devrim GUNDUZ
Hi, On Mon, 2006-01-30 at 21:27 -0500, Jonah H. Harris wrote: I had to deal with an installer written in python and several in Java... IMHO, Java would be a better language for this and you could build off some nice OSS installers that already exist (such as IzPack). Just my 2 cents :)

Re: [GENERAL] PostgreSQL + hibernate

2006-01-31 Thread Csaba Nagy
The error you're seeing comes from before. You only see the fact that there was an error, and postgres is ignoring your queries until you roll back. I bet you have a glitch in your transaction handling code, like opening a transaction, getting an error on it, hibernate throws an error and you

[GENERAL] verifying database integrity - fsck for pg?

2006-01-31 Thread Rich Doughty
We are currently migrating a cluster between hosts. I'd like to verify that the new database has been transferred reliably and that the datafiles are in tact. What's the recommended way to do this? We're using pg_start/stop_backup so an md5 check is out of the question. pg version 8.0 Thanks,

Re: [GENERAL] PostgreSQL + hibernate

2006-01-31 Thread Myatluk Andrey
Hi, Csaba, Here's the original Tomcat log. From this log you can see that exception is thrown in sequence code. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception

Re: [GENERAL] verifying database integrity - fsck for pg?

2006-01-31 Thread Harry Jackson
On 1/31/06, Rich Doughty [EMAIL PROTECTED] wrote: We are currently migrating a cluster between hosts. I'd like to verify that the new database has been transferred reliably and that the datafiles are in tact. What's the recommended way to do this? We're using pg_start/stop_backup so an md5

Re: [GENERAL] PostgreSQL + hibernate

2006-01-31 Thread Myatluk Andrey
Hi, Chris! I've set the sequence owner to my database user. It hasn't changed anything. I guess I have to connect through psql as user and then see what happens. If it fails, what could be my next step? Andrey -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday,

[GENERAL] How to enumerate/drop user sessions in windows

2006-01-31 Thread Howard Cole
Hi, When trying to drop a database using psql connected to a windows server running postgresql 8.0.3, I get the error message Database X is being accessed by other users. Now when the Database server is running on a linux server, I can run ps and pick the sessions that I want to kill.

Re: [GENERAL] PostgreSQL + hibernate

2006-01-31 Thread Csaba Nagy
Yes, the exception is in sequence code, but it is BECAUSE of a previous error, at least that's what I think based on the original mail. Check your transaction handling code... do you have finally clauses around all data access code rolling back if needed ? Just committing in the success case is

Re: [GENERAL] How to enumerate/drop user sessions in windows

2006-01-31 Thread Oliver Fürst
Hi, On 31.01.2006 10:33, Howard Cole wrote: Now when the Database server is running on a linux server, I can run ps and pick the sessions that I want to kill. However how can I do this on windows? Is there a psql command to kill sessions? As this is a bit hard to accomplish with Windows' own

Re: [GENERAL] How to enumerate/drop user sessions in windows

2006-01-31 Thread Howard Cole
Oliver Fürst wrote: As this is a bit hard to accomplish with Windows' own task manager, get SysInternals free Process Explorer from here http://www.sysinternals.com/Utilities/ProcessExplorer.html and after starting it, use Find - Find Handle (CTRL + F) and search for postgres:. This will

Re: [GENERAL] New project launched : PostgreSQL GUI

2006-01-31 Thread Thomas Hallgren
Devrim GUNDUZ wrote: Hi, On Mon, 2006-01-30 at 21:27 -0500, Jonah H. Harris wrote: I had to deal with an installer written in python and several in Java... IMHO, Java would be a better language for this and you could build off some nice OSS installers that already exist (such as IzPack). Just

Re: [GENERAL] schema rename sequence issue

2006-01-31 Thread Sim Zacks
OK. This is working in my test environment. I changed the schema name I changed the binary and text description in the attrdef table. I subtract 1 from the number both before the [ and after the ] because my new schema has 1 letter less then the old schema. It seems to be working. Can anybody

Re: [GENERAL] PostgreSQL + hibernate

2006-01-31 Thread Doug McNaught
Myatluk Andrey [EMAIL PROTECTED] writes: Hi, Chris! I've set the sequence owner to my database user. It hasn't changed anything. I guess I have to connect through psql as user and then see what happens. If it fails, what could be my next step? That would depend on the error message you

Re: [GENERAL] incremental backups

2006-01-31 Thread Tom Lane
Rick Gigger [EMAIL PROTECTED] writes: That's what I mean by invalid. Let's say I do something stupid and do a physical backup and I don't grab the current WAL file. All I have is the last one to be archived before I did my backup, which is not late enough to do a valid restore. Will

Re: [GENERAL] verifying database integrity - fsck for pg?

2006-01-31 Thread Rich Doughty
Tom Lane wrote: Rich Doughty [EMAIL PROTECTED] writes: We are currently migrating a cluster between hosts. I'd like to verify that the new database has been transferred reliably and that the datafiles are in tact. pg_dump both databases and diff the results, perhaps? i had considered

Re: [GENERAL] Little Offtopic: Database frontends

2006-01-31 Thread rlee0001
EMS PostgreSQL Manager for Windows (Commercial) Actually its all I've ever used for postgres but it works well. Could be better. -Robert ---(end of broadcast)--- TIP 4: Have you searched our list archives?

[GENERAL] How to define variables in psql scripts?

2006-01-31 Thread Kynn Jones
kj314159265358979 I know that one can store multiple psql commands and SQL statements in a separate script file, and then source the script file, e.g. with the \i command. My question is, can I define variables in such a script file? E.g. can I do something like the following unix-shell-like

[GENERAL] 8.0.3 regexp_replace()...

2006-01-31 Thread rlee0001
I have a stupid problem. My server is running an old version of postgres (8.0.3) and therefore lacks the regexp_replace() function. It does however support substring and replace functions. So what I am trying to do is emulate the regexp_replace() function by creating a function which finds each

[GENERAL] Can't get the field = ANY(array) clause to work...

2006-01-31 Thread nboutelier
Has anyone successfully used the ANY, ALL, or SOME clause using arrays? Cant seem to get this to work. Heres the gist of my function which returns a SETOF INTEGER[]... DECLARE id_var INTEGER[]; record_var RECORD; BEGIN id_var[0] := 1; id_var[1] := 2; id_var[2] := 3; FOR record_var IN

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-01-31 Thread rlee0001
I did get the code working. The function DDL follows: CREATE OR REPLACE FUNCTION webadmin.regexp_replacex (source varchar, pattern varchar, replacement varchar) RETURNS varchar AS $body$ DECLARE retvalue VARCHAR; BEGIN retvalue = source; LOOP retvalue = REPLACE(retvalue,

[GENERAL] libpq questions

2006-01-31 Thread James Harper
For the libpq interface: I need to be able to know if a column in a result from a query is nullable or not. From reading the documentation it seems that I can obtain the following information: . scan all the rows in the result and see if there exists a null value for each column... . backtrack

Re: [GENERAL] How to define variables in psql scripts?

2006-01-31 Thread Richard Huxton
Kynn Jones wrote: kj314159265358979 I know that one can store multiple psql commands and SQL statements in a separate script file, and then source the script file, e.g. with the \i command. My question is, can I define variables in such a script file? E.g. can I do something like the

[GENERAL] plpython error logs

2006-01-31 Thread P. Scott DeVos
Hey all When using the Fedora Core 4 rpms for plpython, I find that when an error is raised, the error logger does not report the line number of the python function where the error was raised which makes debugging the functions very difficult. Using the native Windows installer, the line

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-01-31 Thread Tom Lane
rlee0001 [EMAIL PROTECTED] writes: CREATE OR REPLACE FUNCTION regexp_replacex (source varchar, pattern varchar, replacement varchar) RETURNS varchar AS $body$ DECLARE retvalue VARCHAR; BEGIN retvalue = source; LOOP retvalue = REPLACE(retvalue, SUBSTRING(retvalue FROM pattern),

Re: [GENERAL] Can't get the field = ANY(array) clause to work...

2006-01-31 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Has anyone successfully used the ANY, ALL, or SOME clause using arrays? Cant seem to get this to work. Heres the gist of my function which returns a SETOF INTEGER[]... DECLARE id_var INTEGER[]; record_var RECORD; BEGIN id_var[0] := 1; I think by default arrays

Re: [GENERAL] Insert rate drops as table grows

2006-01-31 Thread jao
[Sorry if this is a repeat. Thought I sent this but I didn't see it come through the mailing list.] Quoting Tom Lane [EMAIL PROTECTED]: [EMAIL PROTECTED] writes: I have this table and index: create table t(id int, hash int); create index idx_t on t(hash); The value of the hash

Re: [GENERAL] Can't get the field = ANY(array) clause to work...

2006-01-31 Thread Tom Lane
[EMAIL PROTECTED] writes: Has anyone successfully used the ANY, ALL, or SOME clause using arrays? Cant seem to get this to work. Heres the gist of my function which returns a SETOF INTEGER[]... Works for me, modulo the fact that the code is evidently returning setof int not setof int[]. What

[GENERAL] size of bytea + performance issues

2006-01-31 Thread tschak
Hi everyone, my first question concerns the the size of a table with a bytea row. In the documentation it says something like 4 Bytes + 1 Byte for each escaped octet sequence per row. For example an insertion into a table storing just one column with bytea data looks like this: insert into test

Re: [GENERAL] incremental backups

2006-01-31 Thread Rick Gigger
Wonderful. That is good news. Thanks. Rick On Jan 31, 2006, at 7:14 AM, Tom Lane wrote: Rick Gigger [EMAIL PROTECTED] writes: That's what I mean by invalid. Let's say I do something stupid and do a physical backup and I don't grab the current WAL file. All I have is the last one to be

[GENERAL] Automatic monitoring

2006-01-31 Thread Henrique Engelmann
Hi,We´ve many postgresql servers running in linux Redhat/Fedora boxes in our enterprise and we´re looking for some tool to help us to administer and monitor those systems. This tool should monitor some basic linux and postgresql parameters like:. memory usage. swapping . disk i/o queue.

Re: [GENERAL] verifying database integrity - fsck for pg?

2006-01-31 Thread Guido Neitzer
On 31.01.2006, at 16:00 Uhr, Rich Doughty wrote: i had considered pg_dump. i was hoping there was a utility similar to fsck that could check for corruption. i'd like to verify now that the data is ok, rather than coming across errors in 6 months time. I have done this using JDBC (and the

Re: [GENERAL] Automatic monitoring

2006-01-31 Thread Dave Page
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Henrique EngelmannSent: 31 January 2006 16:06To: pgsql-general@postgresql.orgSubject: [GENERAL] Automatic monitoring Hi, We´ve many postgresql servers running in linux Redhat/Fedora boxes in our

[GENERAL] Postgres 8.1 for Mac

2006-01-31 Thread Andrus
How to install Postgres 8.1 on PowerMac 10.1, OS X 10.4.4 ? Is there ready made binaries available for download of should I build from source ? Where are installing or building instructions for Mac available ? Andrus ---(end of

Re: [GENERAL] Postgres 8.1 for Mac

2006-01-31 Thread Jonel Rienton
Initial setup, I used the packages at http://www.entropy.ch and from that point on, I build from source for the upgrades. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrus Sent: Tuesday, January 31, 2006 9:59 AM To: pgsql-general@postgresql.org

Re: [GENERAL] Postgres 8.1 for Mac

2006-01-31 Thread Gavin M. Roy
I haven't compiled it myself, but a guess would be if you installed XCode (which comes with gcc, and should have most if not all the libs needed) it's a matter of grabbing the source, untarring it, running ./ configure in the src dir, make, and make install, etc. (Follow the normal build

Re: [GENERAL] verifying database integrity - fsck for pg?

2006-01-31 Thread Rich Doughty
Guido Neitzer wrote: Perhaps you have to do some tricks to tell the script which tables or columns should be equal and which are allowed to differ, but as far as I can see, it shouldn't be that hard. At all, it took me about a day to verify the db contents. I'm not too fussed about a

Re: [GENERAL] execution plan : Oracle vs PostgreSQL

2006-01-31 Thread FERREIRA, William (VALTECH)
here is the EXPLAIN ANALYSE of my query : {SORT :startup_cost 9.65 :total_cost 9.66 :plan_rows 1 :plan_width 28 :targetlist ( {TARGETENTRY :expr {VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0

Re: [GENERAL] Automatic monitoring

2006-01-31 Thread Rick Gigger
Nagios and snmp http://www.nagios.org/ On Jan 31, 2006, at 9:06 AM, Henrique Engelmann wrote: Hi, We´ve many postgresql servers running in linux Redhat/Fedora boxes in our enterprise and we´re looking for some tool to help us to administer and monitor those systems. This tool should

Re: [GENERAL] Postgres 8.1 for Mac

2006-01-31 Thread Rick Gigger
I haven't tried those specific versions but I'm guessing a build from source will work great. If you are ok with just using 8.0 then you could use fink (http:// fink.sourceforge.net). Fink is apt-get for Mac. It looks like 8.1 is still in their unstable branch. Hopefully it will be moved

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-01-31 Thread Martijn van Oosterhout
On Mon, Jan 30, 2006 at 11:27:23AM -0800, rlee0001 wrote: The problem was that SUBSTRING returns NULL if it cannot find any matches for the pattern and when the second parameter to REPLACE returns NULL, REPLACE returns NULL (which is idiotic). Using COALESCE I ensure that is SUBSTRING cannot

Re: [GENERAL] size of bytea + performance issues

2006-01-31 Thread Martijn van Oosterhout
On Tue, Jan 31, 2006 at 07:58:30AM -0800, tschak wrote: Hi everyone, my first question concerns the the size of a table with a bytea row. In the documentation it says something like 4 Bytes + 1 Byte for each escaped octet sequence per row. For example an insertion into a table storing just

Re: [GENERAL] size of bytea + performance issues

2006-01-31 Thread tschak
Allright... do you mean an alignment with an offset of 4/8 bit or byte? If it is just bit I cannot really follow the calculation... Nevertheless it sounds like an explanation for this effect. I have one more question concerning size. The following table create table test(val0 unsigned smallint,

Re: [GENERAL] verifying database integrity - fsck for pg?

2006-01-31 Thread Tom Lane
Rich Doughty [EMAIL PROTECTED] writes: We are currently migrating a cluster between hosts. I'd like to verify that the new database has been transferred reliably and that the datafiles are in tact. pg_dump both databases and diff the results, perhaps? regards, tom lane

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-01-31 Thread Stephan Szabo
On Mon, 30 Jan 2006, rlee0001 wrote: I did get the code working. The function DDL follows: CREATE OR REPLACE FUNCTION webadmin.regexp_replacex (source varchar, pattern varchar, replacement varchar) RETURNS varchar AS $body$ DECLARE retvalue VARCHAR; BEGIN retvalue = source; LOOP

Re: [GENERAL] libpq questions

2006-01-31 Thread Michael Fuhr
On Tue, Jan 31, 2006 at 10:23:54PM +1100, James Harper wrote: For the libpq interface: I need to be able to know if a column in a result from a query is nullable or not. From reading the documentation it seems that I can obtain the following information: . scan all the rows in the result

Re: [GENERAL] 8.0.3 regexp_replace()...

2006-01-31 Thread Stephan Szabo
On Tue, 31 Jan 2006, Martijn van Oosterhout wrote: On Mon, Jan 30, 2006 at 11:27:23AM -0800, rlee0001 wrote: The problem was that SUBSTRING returns NULL if it cannot find any matches for the pattern and when the second parameter to REPLACE returns NULL, REPLACE returns NULL (which is

Re: [GENERAL] Basic questions about PQprepare()

2006-01-31 Thread Keary Suska
on 1/29/06 8:00 PM, [EMAIL PROTECTED] purportedly said: On Sun, Jan 29, 2006 at 06:03:41PM +0100, Joachim Wieland wrote: On Sat, Jan 28, 2006 at 08:26:01PM +0100, Alexander Farber wrote: Could you explain a bit more, where to get the OIDs? They are in the pg_type table, it is described

Re: [GENERAL] plpython error logs

2006-01-31 Thread Tom Lane
P. Scott DeVos [EMAIL PROTECTED] writes: When using the Fedora Core 4 rpms for plpython, I find that when an error is raised, the error logger does not report the line number of the python function where the error was raised which makes debugging the functions very difficult. Using the

Re: [GENERAL] execution plan : Oracle vs PostgreSQL

2006-01-31 Thread Tom Lane
FERREIRA, William (VALTECH) [EMAIL PROTECTED] writes: here is the EXPLAIN ANALYSE of my query : That's not an EXPLAIN ANALYZE ... that's an EXPLAIN VERBOSE, which is hardly ever of any use for performance issues. regards, tom lane ---(end of

Re: [GENERAL] size of bytea + performance issues

2006-01-31 Thread Martijn van Oosterhout
On Tue, Jan 31, 2006 at 09:15:18AM -0800, tschak wrote: Allright... do you mean an alignment with an offset of 4/8 bit or byte? If it is just bit I cannot really follow the calculation... Nevertheless it sounds like an explanation for this effect. I have one more question concerning size.

Re: [GENERAL] size of bytea + performance issues

2006-01-31 Thread Jochen Schlosser
Well, it's in the FAQ under How much database disk space is required to store data from a typical text file? but the per tuple overhead is between 36 and 44 bytes. depends a bit on the version. allright... thx a lot! I did not see this point in the FAQ because I am not storing data from a

Re: [GENERAL] Basic questions about PQprepare()

2006-01-31 Thread Tom Lane
Keary Suska [EMAIL PROTECTED] writes: This thread has particular interest to me as well--the libpq documentation and examples seem to imply that the backend will consider all parameters to be string literals, although postgres is smart enough to perform conversions. No, not a string literal

Re: [GENERAL] Hey!!!

2006-01-31 Thread Jim C. Nasby
On Fri, Jan 27, 2006 at 12:01:48AM -0600, Bruno Wolff III wrote: On Thu, Jan 26, 2006 at 18:24:36 +0100, LaroG [EMAIL PROTECTED] wrote: Hey. I am new here. I???m from Poland:-) I have one question (I don???t now if this is the right group for this question and ??? if my English is

[GENERAL] Best way to handle table trigger on update

2006-01-31 Thread Justin Pasher
Postgres 7.4.7 (I know, a little old, but we haven't had a chance to upgrade) I have a table that stores menu items for a side navigation menu for a web site. Each menu item has a position column set that determines where to put the menu item in the display. At any given time, the menu items

Re: [GENERAL] VACUUM Question

2006-01-31 Thread Jim C. Nasby
On Thu, Jan 26, 2006 at 04:14:45PM -0500, Chris Browne wrote: As for Reindex, I'm not entirely sure, I don't think you would benefit from reindex because you aren't updating or deleting. Can anyone comment on this? Is is possibile that a table with lots of inserts resulting in lots of

[GENERAL] help with locked table(s)/transactions(s)

2006-01-31 Thread Mott Leroy
Recently we discovered that a stored procedure that we run locks some table(s) and prevents some SQL from running. We discovered this because doing a simple grep against postgres processes revealed several processes WAITING: -- snip -- 00:04:31 postgres: dataman our_db 10.0.0.103 INSERT

Re: [GENERAL] xmin system column

2006-01-31 Thread Jim C. Nasby
On Fri, Jan 27, 2006 at 11:18:23AM +0100, Christian Kratzer wrote: Hi, On Thu, 26 Jan 2006, Eric B. Ridge wrote: snip/ long pause hahaha, *blush*. I could just use now(), right? pg8.1 docs say that now()/CURRENT_TIMESTAMP return the start time of the current transaction; their

Re: [GENERAL] help with locked table(s)/transactions(s)

2006-01-31 Thread Tom Lane
Mott Leroy [EMAIL PROTECTED] writes: One thing I noticed is it seems like for every transaction lock there's an ExclusiveLock (to be expected, a lock on the transaction num) as well as a ShareLock on the same transaction which has not been granted the lock -- does this mean that two

Re: [GENERAL] FW: Schema with Postgress 8.1

2006-01-31 Thread Jim C. Nasby
It would probably be very useful to turn on query logging in PostgreSQL to see what exactly the ODBC layer is attempting to do. In the meantime, you can certainly create a postgres schema. If you want to do this via psql: psql -c 'create schema postgres; grant all on schema postgres to public'

Re: [GENERAL] plpython error logs

2006-01-31 Thread P. Scott DeVos
Tom Lane wrote: P. Scott DeVos [EMAIL PROTECTED] writes: When using the Fedora Core 4 rpms for plpython, I find that when an error is raised, the error logger does not report the line number of the python function where the error was raised which makes debugging the functions very difficult.

Re: [GENERAL] Postgres 8.1 for Mac

2006-01-31 Thread Benjamin Reed
On 1/31/06, Rick Gigger [EMAIL PROTECTED] wrote: I haven't tried those specific versions but I'm guessing a build from source will work great. If you are ok with just using 8.0 then you could use fink (http:// fink.sourceforge.net). Fink is apt-get for Mac. It looks like 8.1 is still in

Re: [GENERAL] PostgreSQL + hibernate

2006-01-31 Thread Jim C. Nasby
On Tue, Jan 31, 2006 at 10:13:05AM +0300, Myatluk Andrey wrote: SEVERE: ERROR: current transaction is aborted, commands ignored until end of transaction block Jan 30, 2006 8:21:35 PM That error means something prior to that in the same transaction failed and you haven't issued a rollback yet.

Re: [GENERAL] size of bytea + performance issues

2006-01-31 Thread Jim C. Nasby
On Tue, Jan 31, 2006 at 08:15:44PM +0100, Jochen Schlosser wrote: Well, it's in the FAQ under How much database disk space is required to store data from a typical text file? but the per tuple overhead is between 36 and 44 bytes. depends a bit on the version. allright... thx a lot! I did

Re: [GENERAL] Postgres 8.1 for Mac

2006-01-31 Thread Jim C. Nasby
There's also darwinports, which has 8.1.2. On Tue, Jan 31, 2006 at 09:44:13AM -0700, Rick Gigger wrote: I haven't tried those specific versions but I'm guessing a build from source will work great. If you are ok with just using 8.0 then you could use fink (http:// fink.sourceforge.net).

Re: [GENERAL] Best way to handle table trigger on update

2006-01-31 Thread Jim C. Nasby
You should be able to detect for the case where NEW.position OLD.position and ignore it, no? On Tue, Jan 31, 2006 at 01:45:09PM -0600, Justin Pasher wrote: Postgres 7.4.7 (I know, a little old, but we haven't had a chance to upgrade) I have a table that stores menu items for a side

Re: [GENERAL] help with locked table(s)/transactions(s)

2006-01-31 Thread Mott Leroy
Tom Lane wrote: No, the ShareLock is the means used when transaction A needs to wait for transaction B to complete --- it tries to take a share lock on xact B's XID, which of course is blocked as along as B is holding its ExclusiveLock. This is used when there is a row-update conflict, ie, A

Re: [GENERAL] help with locked table(s)/transactions(s)

2006-01-31 Thread Tom Lane
Mott Leroy [EMAIL PROTECTED] writes: Will postgres lock on all rows as it goes through this loop? Or can you give me a better idea of what I can expect to be locked in my example? SELECTs don't lock any rows. INSERTs don't create any lockable rows in themselves (other backends can't even see

Re: [GENERAL] Rotation of security logs in Postgres 7.4.11

2006-01-31 Thread Bruce Momjian
John Zubac wrote: Hi Everyone What is the best way to go about rotating the postgres security log file on postgresql 7.4.11 under openbsd 3.7? I got it to work logging to a file but as soon as the file rotates the new log is dead. Would reloading the postmaster after the log rotation

[GENERAL] postmaster crash

2006-01-31 Thread Steve Oualline
We have an interesting problem here. We have a server at a customer's site on which the database will not come up. Because of the nature of the product we make, we don't turn on Postgresql logs, so no log data is avaliable. What we see is that when we start postmaster it starts, but anyone who

Re: [GENERAL] Best way to handle table trigger on update

2006-01-31 Thread Justin Pasher
I must not be following what you are saying. There are cases where NEW.position could be greater than OLD.position and it cannot ignore it. Here's the pseudo code for my store procedure. IF OLD.position NEW.position THEN drop the trigger IF NEW.position OLD.position THEN bump

[GENERAL] Data Conversion

2006-01-31 Thread Bob Pawley
Im looking for ideas on the direction I should take. Im constructing an engineering database. I want to include the capability of converting engineering data to different systems. For instance Fahrenheit to Celsius, lbs/hr to gph to gpm and to liters per minute. My thinking is

Re: [GENERAL] Data Conversion

2006-01-31 Thread Michael Glaesemann
On Feb 1, 2006, at 9:02 , Bob Pawley wrote: 1 – creating a single table of data in the format of the users’ choice, then converting the data en masse as the user requests. Sort of like conversion-on-demand. I've been thinking about a similar application recently, and leaning

Re: [GENERAL] Data Conversion

2006-01-31 Thread Bob Pawley
Two way conversion will be a neccesity. My thought was that dual conversion could be not only complex but also have problems with stability. Option 2 would be less complex and there would be less potential stability problems. However, there is some perception of redundancy in having two or

Re: [GENERAL] Data Conversion

2006-01-31 Thread Dann Corbit
I would create functions. Store the data in one format, and convert with functions as needed on the fly. E.g.: SELECT Fahrenheit_to_Celcius(Fahrenheit_temp) FROM temperatures; If that seems kludgy for the users, then create views for them that perform the needed conversions using the functions.

Re: [GENERAL] Data Conversion

2006-01-31 Thread Michael Glaesemann
On Feb 1, 2006, at 9:53 , Bob Pawley wrote: Two way conversion will be a neccesity. My thought was that dual conversion could be not only complex but also have problems with stability. I'm not sure why it would be a stability issue. As for the complexity, I think once it's implemented

Re: [GENERAL] Data Conversion

2006-01-31 Thread Bob Pawley
I'm a little concerned about stability since my Postgresql application has failed three times in the last couple of months. It seems to have failed when too many things are happening at the same time - mostly things that have been instigated by my pointing and clicking. Bob - Original

Re: [GENERAL] Data Conversion

2006-01-31 Thread Michael Glaesemann
On Feb 1, 2006, at 10:32 , Bob Pawley wrote: I'm a little concerned about stability since my Postgresql application has failed three times in the last couple of months. It seems to have failed when too many things are happening at the same time - mostly things that have been instigated by

Re: [GENERAL] Data Conversion

2006-01-31 Thread Bob Pawley
I'm running version 8.1 on XP. When I point and click on pgadmin tables too quickly, sometimes, the program freezes and I get the Windows message about reporting the failure. If I stay cool and 'deterministic' (in other words - slow) there doesn't seem to be a problem. However, this may

Re: [GENERAL] libpq questions

2006-01-31 Thread Michael Fuhr
On Wed, Feb 01, 2006 at 09:47:12AM +1100, James Harper wrote: Be careful what you infer from such a scan: not finding any NULLs doesn't necessarily mean a column isn't nullable, it just means the result set didn't contain any NULLs. I understand that limitation, but haven't figured out if

Re: [GENERAL] libpq questions

2006-01-31 Thread James Harper
Even if such a query did return a nullable flag, plenty of other metadata would be absent that might be just as interesting from a schema-viewing standpoint (CHECK, PRIMARY KEY, etc.). A better way to view the schema is to query the system catalogs or the Information Schema. I now know

[GENERAL] returning a cursor from a function?

2006-01-31 Thread Matthew Hixson
I have a create function statement that works with Oracle 8i and I'm trying to create this function in Postgres 8.1.2. CREATE OR REPLACE FUNCTION pr_user( p0 CHAR ) RETURN Types.cursor_type IS rs Types.cursor_type; BEGIN OPEN rs FOR SELECT us.approval_type_code AS us_approval_type_code FROM

Re: [GENERAL] returning a cursor from a function?

2006-01-31 Thread Michael Fuhr
On Tue, Jan 31, 2006 at 10:37:47PM -0800, Matthew Hixson wrote: I have a create function statement that works with Oracle 8i and I'm trying to create this function in Postgres 8.1.2. See the PL/pgSQL documentation, in particular the section on cursors, which has several examples. You might

Re: [GENERAL] returning a cursor from a function?

2006-01-31 Thread Matthew Hixson
Thanks, Michael. Don't know how I missed those. -M@ On Jan 31, 2006, at 10:55 PM, Michael Fuhr wrote: On Tue, Jan 31, 2006 at 10:37:47PM -0800, Matthew Hixson wrote: I have a create function statement that works with Oracle 8i and I'm trying to create this function in Postgres 8.1.2. See

Re: [GENERAL] PostgreSQL + hibernate

2006-01-31 Thread Myatluk Andrey
Hi, all! I was able to fix the problem, by dropping the sequence and recreating with the username hibernate uses. Although before that I connected to database as hibernate user and tried to call hibernate_sequence and it worked fine. Thank you! Andrey -Original Message- From: Chris