Re: [BUGS] BUG #1640: Using JDBC, multiple statements do not return

2005-04-30 Thread Kris Jurka


On Fri, 29 Apr 2005, Kevin Self wrote:

 Bug reference:  1640
 PostgreSQL version: 8.0.2
 Description:Using JDBC, multiple statements do not return results if
 select follows insert,delete or update
 
 When attempting to perform a multi-statement command through the JDBC
 Statement.execute() or the Statement.executeQuery() function, the database
 does not return any result set if the select statement follows an insert,
 update or delete. This ability is required for atomic record inserts for
 auto-generated keys that must be returned to the caller, since postgreSQL
 does not support RETURN_GENERATED_KEYS as an option, and calling the
 sequence ahead of time to obtain the value is not possible.

There is no atomicity from issuing them in the same query.  This is 
guaranteed by the sequence for the entire session.

If you do what to do this it should be written as:

Statement.execute(INSERT ...; SELECT currval('myseq'));
Statement.getMoreResults();
ResultSet rs = Statement.getResultSet();

The javadoc for execute() says it should return true if the first result 
is a ResultSet object the first result is an update count, not a 
ResultSet.  You need to move to the next result, which is actually a 
ResultSet.

Kris Jurka


---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [BUGS] looks like apple fixed /etc/rc

2005-04-30 Thread Jim C. Nasby
Is that tool on OSX Server? I don't have a copy, though I could probably
find out from a friend.

On Fri, Apr 29, 2005 at 11:57:54PM -0400, Bruce Momjian wrote:
 
 Are they still running on the default PostgreSQL port number for their
 remote administration tool?
-- 
Jim C. Nasby, Database Consultant   [EMAIL PROTECTED] 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming, or what?

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [BUGS] BUG #1632: Several jailed PostgreSQL instances.

2005-04-30 Thread Nicolai Petri (lists)
You are correct - freebsd have indeed a global shm space which I don't think 
is fixed in 5.x yet. We have run up to 4 postgresql in jails for our testing 
and it just-works(tm) if we choose a different port for each database 
instance.
It might still be a good idea for postgresql to be able to detect this 
collision without crashing each others backend or doing other weird stuff. 
Maybe a dedicated bit in the  shm space could be flipped by the new 
postmaster so it could see if it was flipped back again - this would allow 
it to abort gracefully with a Other postmaster active in my shared memory 
error.

Any other ideas ? It should be trivally to implement something to handle it 
better.

Nicolai Petri
- Original Message - 
From: Achilleus Mantzios [EMAIL PROTECTED]
To: Alexander Rusinov [EMAIL PROTECTED]
Cc: pgsql-bugs@postgresql.org
Sent: Wednesday, April 27, 2005 3:53 PM
Subject: Re: [BUGS] BUG #1632: Several jailed PostgreSQL instances.


O Alexander Rusinov   Apr 27, 2005 :
The following bug has been logged online:
Bug reference:  1632
Logged by:  Alexander Rusinov
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 7.4.7
Operating system:   FreeBSD 5.4-PRERELEASE i386
Description:Several jailed PostgreSQL instances.
Details:
Excuse me if i missed some episodes, but to the best of my knowledge,
FreeBSD IPC is not jailified.
There have been talks and talks on the matter on both lists,
and it seems
the only way to go is to start the jailed postgresql instances
to listen to different ports.
Tom and others, please correct me if situation now with FreeBSD 5.3+ has
changed.

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faq


Re: [BUGS] looks like apple fixed /etc/rc

2005-04-30 Thread Theodore Petrosky
Jim,

I didn't understand your comment 

It appears that you can shrink shmmax but not expand
it.

I did not comment out the  kern.sysv.shmmax line and
it appears that my larger setting is sticking. Or is
it? What is that command to return the currrnt values
from the terminal?

Ted

--- Jim C. Nasby [EMAIL PROTECTED] wrote:
 That's interesting. On my powerbook, I had to
 comment out the sysctl -w
 kern.sysv.shmmax line in /etc/rc. It appears that
 you can shrink shmmax
 but not expand it. This meant that it would properly
 set it based on
 /etc/syscttl.conf, but that (large) setting would
 then be over-written
 by the subsiquent sysctl -w.
 
 On Fri, Apr 29, 2005 at 09:39:55AM -0700, Theodore
 Petrosky wrote:
  I just updated to 10.3.9 and of course the /etc/rc
 was
  dinged. I opened the /etc/rc and found a change..
  
  # System tuning
  sysctl -w kern.maxvnodes=$(echo $(sysctl -n
  hw.physmem) '33554432 / 512 * 1024 +p'|dc)
  if [ -f /etc/sysctl-macosxserver.conf ]; then
  awk '{ if (!index($1, #)  index($1,
 =))
  print $1 }'  /etc/sysctl-macosxserver.conf |
 while
  read
  do
  sysctl -w ${REPLY}
  done
  fi
  
  if [ -f /etc/sysctl.conf ]; then
  awk '{ if (!index($1, #)  index($1,
 =))
  print $1 }'  /etc/sysctl.conf | while read
  do
  sysctl -w ${REPLY}
  done
  fi
  
  sysctl -w kern.sysv.shmmax=4194304
  sysctl -w kern.sysv.shmmin=1
  sysctl -w kern.sysv.shmmni=32
  sysctl -w kern.sysv.shmseg=8
  sysctl -w kern.sysv.shmall=1024
  
  It appears that apple is checking for
 etc/sysctl.conf
  before setting the sysctl values. so I created a
  etc/sysctl.conf with this inside:
  
  kern.sysv.shmmax=33554432
  kern.sysv.shmmin=1
  kern.sysv.shmmni=32
  kern.sysv.shmseg=8
  kern.sysv.shmall=65536
  
  I did not alter /etc/rc. postgresql starts up just
  fine. I hope this implys that the issue is
 resolved..
  
  Ted
  
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around 
  http://mail.yahoo.com 
  
  ---(end of
 broadcast)---
  TIP 1: subscribe and unsubscribe commands go to
 [EMAIL PROTECTED]
  
 
 -- 
 Jim C. Nasby, Database Consultant  
 [EMAIL PROTECTED] 
 Give your computer some brain candy!
 www.distributed.net Team #1828
 
 Windows: Where do you want to go today?
 Linux: Where do you want to go tomorrow?
 FreeBSD: Are you guys coming, or what?
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [BUGS] BUG #1639: Problema re-instalacion

2005-04-30 Thread Jaime Casanova
On 4/29/05, PABLO [EMAIL PROTECTED] wrote:
 
 The following bug has been logged online:
 
 Bug reference:  1639
 Logged by:  PABLO
 Email address:  [EMAIL PROTECTED]
 PostgreSQL version: 8.02
 Operating system:   windows 2000
 Description:Problema re-instalacion
 Details:
 
 Hola :
 
 Tuve que reinstalar posgresql 8.02. Primero lo desintale, luego, elimine las
 carpetas que quedaban, reinicie la maquina. Puse a instalar de nuevo
 postgresql 8.02 y en la parte del usuario siempre me pone que existe,
 cualquiera que le pongo. ¿Como puedo solucionar eso?, ¿queda registrado en
 algun lado el usuario que tuve?. Por favor, necesito la respuesta rapido.
 
Borra el usuario postgres que se creo para arrancar el servicio, busca
en panel de control-herramientas administrativas-

-- 
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]