Re: [ADMIN] Postgresql UPDATE LOCKS unrelated rows.

2003-09-18 Thread Stephan Szabo
On Fri, 19 Sep 2003, Ravi T Ramachandra wrote: > Here is the table structure. FYI, we tried the experiment with mysql > and the concurrency is working fine. > > create table TABLE1( TABLE_ID IDENTITY NOT NULL , > VA_ID SMALLINT NOT NULL, > >

Re: [ADMIN] Postgresql UPDATE LOCKS unrelated rows.

2003-09-18 Thread Ravi T Ramachandra
Hi Stephan, Here is the table structure. FYI, we tried the experiment with mysql and the concurrency is working fine. create table TABLE1( TABLE_ID IDENTITY NOT NULL , VA_ID SMALLINT NOT NULL, V_ST

Re: [ADMIN] Testing for a record before update or insert without using a function.

2003-09-18 Thread Chris White (cjwhite)
Why not try doing the update and if that fails i.e. returns a value of 0 (no row updated), then do the insert. Thus if your high runner case is that the entry exists, then you are going to bypass having to test if the entry exists. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [ADMIN] [PERFORM] How to force an Index ?

2003-09-18 Thread Tom Lane
Rhaoni Chiu Pereira <[EMAIL PROTECTED]> writes: > I need to know if there is a way to set the to_char output to varchar instead of > text ! Why don't you change the datatype of ano_mes to text, instead? It's unlikely your application would notice the difference. (You could set a CHECK constraint

Re: [ADMIN] dump among different versions of postgreSQL

2003-09-18 Thread Kuhn, Dylan K (4520500D)
I've successfully dumped and restored a database containing large objects with 7.3.3 and previous versions. I've used the 'tar' archive format something like this: % pg_dump -F t -b dbwithlos | gzip > dump.tar.gz % zcat dump.tar.gz | pg_restore -d restoredbwithlos Dylan Kuhn > -Original Me

Re: [ADMIN] Postgresql UPDATE LOCKS unrelated rows.

2003-09-18 Thread Stephan Szabo
On Thu, 18 Sep 2003, Ravi T Ramachandra wrote: > > Hi, > > We are using postgresql 7.3.2 on lunux platform. We performed locking > test as follows via JDBC: > > Started 2 concurrent transaction with autocommit false and isolation > READ_COMMITTED : > > Transaction 1: > === > Update row

Re: [ADMIN] [PERFORM] How to force an Index ?

2003-09-18 Thread Rhaoni Chiu Pereira
I solve this problem doing this: create function date_to_mm( timestamp ) returns gsames00.ano_mes%type as 'select to_char($1, ''MM''); ' language sql immutable strict; And changing the SQL where clause: ... gsames00.ano_mes = to_char(ftnfco00.data_emissao,'MM') AND ... to: ...

[ADMIN] Testing for a record before update or insert without using a function.

2003-09-18 Thread Geoff Ellis
Is it possible to test if a record exists in a table and then if it does do an update on that table or if it doesn't do an insert ? I've looked around the documents and it seems everything points towards a function? Is this the only way or has someone done this before. TIA Geoff --

Re: [ADMIN] initdb problem

2003-09-18 Thread Jaskier
Hi, No it will not work, You have to be owner, or have full access to this directory. Also you should, I think this is necessary to run Initdb as a Postgres user. This is what you have to do: As root change rights to this /usr/local/pgsql and change the owner (it would be better) to Postgres The

[ADMIN] initdb problem

2003-09-18 Thread Andy Callan
My installation of PostgreSQL was created when i installed a GIS application but it does not appear to have a data cluster specified so I did the following: [Computer:local/pgsql/bin] andrewcallan% ./initdb -D /usr/local/pgsql/data The files belonging to this database system will be own