[GENERAL] Uncommitted Data

2010-12-07 Thread Jonathan Tripathy
Hi Everyone, What does PG do with data that has been inserted into a table, but was never committed? Does the data get discarded once the connection dies? Thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.o

[GENERAL] Syntax error near returning

2010-11-23 Thread Jonathan Tripathy
Hi Everyone, When I create a prepared statement like this in java (using JDBC): pStmt = conn.prepareStatement(qry); everything works ok. However when I want a scrollable resultset and use this: pStmt = conn.prepareStatement(qry,ResultSet.TYPE_SCROLL_INSENSITIVE); I get a syntax error: org.pos

Re: [GENERAL] Return key from query

2010-11-03 Thread Jonathan Tripathy
Sorry, I don't get it. I usually have an application that knows if it wants to write some data to database, or not. So it writes the data, and just gets from database the id that was set by database. No need of getting the id earlier in a transaction, although the simple insert that saves the d

Re: [GENERAL] JDBC Transactions

2010-11-02 Thread Jonathan Tripathy
On 02/11/10 23:11, Craig Ringer wrote: On 02/11/10 18:29, Jonathan Tripathy wrote: I don't really mind what happens, as long as the user is made aware of what has happen, and there aren’t any memberships with no corresponding customers. Well, that's taken care of by a referential

[GENERAL] Return key from query

2010-11-02 Thread Jonathan Tripathy
Hi everyone, When adding a new record, we run an insert query which auto-increments the primary key for the table. However the method (in java) which calls this query must return the newly created key. Any ideas on how to do this, preferably using a single transaction? Thanks -- Sent via pg

Re: [GENERAL] Replication

2010-11-02 Thread Jonathan Tripathy
From: pgsql-general-ow...@postgresql.org on behalf of Vick Khera Sent: Tue 02/11/2010 13:18 To: pgsql-general Subject: Re: [GENERAL] Replication On Tue, Nov 2, 2010 at 2:59 AM, Jonathan Tripathy wrote: > What is the difference between the "Hot-Stan

Re: [GENERAL] JDBC Transactions

2010-11-02 Thread Jonathan Tripathy
On 02/11/10 09:53, Craig Ringer wrote: On 11/02/2010 03:01 AM, Jonathan Tripathy wrote: user1 goes to customer page, clicks on "delete membership" of the last member ship, which blows away the membership, user2 goes to customer page, clicks on "add membership" and sta

Re: [GENERAL] Replication

2010-11-02 Thread Jonathan Tripathy
On 02/11/10 01:56, Scott Marlowe wrote: On Mon, Nov 1, 2010 at 4:39 PM, Jonathan Tripathy wrote: On 01/11/10 21:10, Vick Khera wrote: On Mon, Nov 1, 2010 at 3:53 PM, Jonathan Tripathy wrote: The standby must support INSERTS and UPDATES as well (once the master has failed) Are there any

Re: [GENERAL] Replication

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 21:10, Vick Khera wrote: On Mon, Nov 1, 2010 at 3:53 PM, Jonathan Tripathy wrote: The standby must support INSERTS and UPDATES as well (once the master has failed) Are there any solutions like this? Looking on the Postgresql site, all the standby solutions seem to be read only

Re: [GENERAL] Replication

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 20:26, Thomas Kellerer wrote: Jonathan Tripathy wrote on 01.11.2010 21:12: 9.0 has streaming replication and "Hot Standby" http://www.postgresql.org/docs/current/static/hot-standby.html http://www.postgresql.org/docs/current/static/warm-standby.html#STREAMING-R

Re: [GENERAL] Replication

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 20:21, Scott Marlowe wrote: On Mon, Nov 1, 2010 at 2:12 PM, Jonathan Tripathy wrote: On 01/11/10 20:01, Thomas Kellerer wrote: Jonathan Tripathy wrote on 01.11.2010 20:53: Hi Everyone, I'm looking for the best solution for "Hot Standbys" where once the primary se

Re: [GENERAL] Replication

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 20:01, Thomas Kellerer wrote: Jonathan Tripathy wrote on 01.11.2010 20:53: Hi Everyone, I'm looking for the best solution for "Hot Standbys" where once the primary server fails, the standby will take over and act just like the master did. The standby must supp

Re: [GENERAL] JDBC Transactions

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 19:56, Andy Colson wrote: On 11/1/2010 2:29 PM, Jonathan Tripathy wrote: On 01/11/10 19:12, Andy Colson wrote: On 11/1/2010 2:01 PM, Jonathan Tripathy wrote: I'll give you the exact case where I'm worried: We have a table of customers, and each customer can hav

[GENERAL] Replication

2010-11-01 Thread Jonathan Tripathy
Hi Everyone, I'm looking for the best solution for "Hot Standbys" where once the primary server fails, the standby will take over and act just like the master did. The standby must support INSERTS and UPDATES as well (once the master has failed) Are there any solutions like this? Looking on

Re: [GENERAL] JDBC Transactions

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 19:12, Andy Colson wrote: On 11/1/2010 2:01 PM, Jonathan Tripathy wrote: I'll give you the exact case where I'm worried: We have a table of customers, and each customer can have multiple memberships (which are stored in the memberships table). We want our deleteMemb

Re: [GENERAL] JDBC Transactions

2010-11-01 Thread Jonathan Tripathy
I'll give you the exact case where I'm worried: We have a table of customers, and each customer can have multiple memberships (which are stored in the memberships table). We want our deleteMembership(int membershipID) method to remove the membership, then check to see if there are no more membe

Re: [GENERAL] JDBC Transactions

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 18:38, Jonathan Tripathy wrote: Hi Andy, Thanks for your reply. Would the above code be classed as a single transaction then? Yes, assuming there's no explicit transaction control (COMMIT/ROLLBACK/END) in your queries. Actually, we do have maybe one or 2 queries tha

Re: [GENERAL] JDBC Transactions

2010-11-01 Thread Jonathan Tripathy
Hi Andy, Thanks for your reply. Would the above code be classed as a single transaction then? Yes, assuming there's no explicit transaction control (COMMIT/ROLLBACK/END) in your queries. Actually, we do have maybe one or 2 queries that use ROLLBACK, however ROLLBACK happens at the end of a "c

Re: [GENERAL] JDBC Transactions

2010-11-01 Thread Jonathan Tripathy
On 01/11/10 18:08, Andy Colson wrote: On 11/1/2010 12:37 PM, Jonathan Tripathy wrote: Hi Everyone, I'm trying to create a server for a database system which will be used by multiple clients. Of course, table locking is very important. Reading the Postgresql docs, locking occurs

[GENERAL] JDBC Transactions

2010-11-01 Thread Jonathan Tripathy
Hi Everyone, I'm trying to create a server for a database system which will be used by multiple clients. Of course, table locking is very important. Reading the Postgresql docs, locking occurs on a transaction-by-transaction basis. In our java code, we are doing this: //Start Code Block Con

[GENERAL] Connection Pool

2010-11-01 Thread Jonathan Tripathy
Hi Everyone, I'm trying to work with connection pools. The example I'm looking at is lockated here: http://www.developer.com/img/2009/11/Listing1_ConnectionPoolClass.html You will notice that the getConnectionFromPool method does not implement any blocking, and only returns null. I would l

Re: [GENERAL] Connection question

2010-09-01 Thread Jonathan Tripathy
On 01/09/10 16:22, Bayless Kirtley wrote: I have a two-user point-of-sale application on Windows XP PRO. The DB runs on the cash register. The second user is a manager's computer. They are connected through a wired router which is also connected to an internet cable modem. The manager's compute

Re: [GENERAL] Authentication method for web app

2010-05-14 Thread Jonathan Tripathy
From: pgsql-general-ow...@postgresql.org on behalf of Leonardo F Sent: Fri 14/05/2010 14:24 To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Authentication method for web app >I think this point number 2 is pretty important. If at all possible, keep > the

[GENERAL] Licence

2010-03-10 Thread Jonathan Tripathy
Hi Everyone, Can someone please confirm that the PostgreSQL licence allow commercial distribution (with a fee charged)? I am developing a proprietary (i.e. non-free) solution in Java, and wish to use PostgreSQL as the backend database. We wish to ship the server with our software, as well as u