[GENERAL] Postgres on shared network drive

2008-04-11 Thread J Ottery
Using windows XP and TCP/IP network. I install PostgreSQL on a client PC and put the data files on a networked drive (instead of the local drive). Postgres as user and localport. This works well. Now I install postgresSQL on another client machine and point it to the same data directory on the

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Tomasz Ostrowski
On 2008-04-11 08:53, J Ottery wrote: I install PostgreSQL on a client PC and put the data files on a networked drive (instead of the local drive). Postgres as user and localport. This works well. This is not the way it is meant to work, and it can eat your data. Now I install postgresSQL

[GENERAL] PG 8.3 review in Linux Mag

2008-04-11 Thread Brent Wood
You can't read the online article without an account, but the headlines might still be of interest (or you can buy the magazine :-) http://www.linux-mag.com/id/5679 Cheers, Brent Wood -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] How does psql actually implement the \d commands

2008-04-11 Thread Andrew Falanga
On Apr 9, 5:51 am, [EMAIL PROTECTED] (Albe Laurenz) wrote: Andrew Falanga wrote: I know about the -E option to psql and did that to get the following, which is what psql does for a \d tablename: * QUERY ** SELECT c.oid, n.nspname, c.relname FROM

Re: [GENERAL] begin transaction locks out other connections

2008-04-11 Thread Dennis Brakhane
On Thu, Apr 10, 2008 at 4:40 PM, Pavan Deolasee [EMAIL PROTECTED] wrote: On Thu, Apr 10, 2008 at 7:18 PM, Ivano Luberti [EMAIL PROTECTED] wrote: I think that's because Postgres does not have deferred constraint checks. I believe it does. See

Re: [GENERAL] how to use transaction isolation

2008-04-11 Thread Jan de Visser
On 4/10/08, Gong [EMAIL PROTECTED] wrote: In the java code below, I set the transaction isolation to serialization. public class IsolationTest { private static String select = select * from tmp where url = 'aaa'; public static void main(String[] args) throws Exception{

Re: [GENERAL] begin transaction locks out other connections

2008-04-11 Thread Craig Ringer
Dennis Brakhane wrote: On Thu, Apr 10, 2008 at 4:40 PM, Pavan Deolasee [EMAIL PROTECTED] wrote: On Thu, Apr 10, 2008 at 7:18 PM, Ivano Luberti [EMAIL PROTECTED] wrote: I think that's because Postgres does not have deferred constraint checks. I believe it does. See

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Craig Ringer
J Ottery wrote: Using windows XP and TCP/IP network. I install PostgreSQL on a client PC and put the data files on a networked drive (instead of the local drive). Postgres as user and localport. This works well. I wouldn't personally trust this setup. Now I install postgresSQL on another

[GENERAL] PostgresSQL on a networked drive with multiple users

2008-04-11 Thread J Ottery
Thanks Craig for making me look like an idiot. I feel bad now. When I posted I suspected that what you have just replied with was the case. I have some leaning to do on this. Jeff -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] PostgresSQL on a networked drive with multiple users

2008-04-11 Thread Craig Ringer
J Ottery wrote: Thanks Craig for making me look like an idiot. I feel bad now. That wasn't my intent, so I'm sorry for making you feel bad about it. I was just trying to stress the importance of only ever having one pg instance using a data directory. If you're used to shared-access systems

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Craig Ringer
J Ottery wrote: Thanks so much Craig. I have decided to migrate to Postgres and most of my applications are single computer based but I need to plan for future needs. Some research is in order for me. All you should need to do is allow the user / administrator to configure the connection

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Magnus Hagander
Tomasz Ostrowski wrote: On 2008-04-11 08:53, J Ottery wrote: I install PostgreSQL on a client PC and put the data files on a networked drive (instead of the local drive). Postgres as user and localport. This works well. This is not the way it is meant to work, and it can eat your

Re: [GENERAL] how to use transaction isolation

2008-04-11 Thread Gong
On 4/11/08, Jan de Visser [EMAIL PROTECTED] wrote: Your commit at (2) ends the transaction, and the second select runs in a new one. jan -- I got it. I didn't notice it is the *TRANSACTION* isolation. Thanks a lot! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread A. Kretschmer
am Thu, dem 10.04.2008, um 23:53:18 -0700 mailte J Ottery folgendes: Using windows XP and TCP/IP network. I install PostgreSQL on a client PC and put the data files on a networked drive (instead of the local drive). Postgres as user and localport. This works well. Now I install

Re: [GENERAL] How does psql actually implement the \d commands

2008-04-11 Thread Albe Laurenz
Andrew Falanga wrote: I know about the -E option to psql and did that to get the following, which is what psql does for a \d tablename: [...] Now, I tried to execute these queries one at a time and they failed, somewhat miserably. In what order does PostgreSQL actually execute

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Pavan Deolasee
On Fri, Apr 11, 2008 at 1:04 PM, A. Kretschmer [EMAIL PROTECTED] wrote: You idea is complete ill. PostgreSQL is a Server-Client-database, with one Server and multiple Clients. You can't access to the same database-files with multiple database-servers. I wonder if it would make sense to

Re: [GENERAL] begin transaction locks out other connections

2008-04-11 Thread Pavan Deolasee
On Thu, Apr 10, 2008 at 11:29 PM, Dennis Brakhane [EMAIL PROTECTED] wrote: I believe it does. See http://www.postgresql.org/docs/8.3/interactive/sql-set-constraints.html and the DEFERRABLE keyword in CREATE TABLE. Or am I missing something here? Only foreign key contrains checks (and

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread J Ottery
On Apr 11, 5:34 pm, [EMAIL PROTECTED] (A. Kretschmer) wrote: am Thu, dem 10.04.2008, um 23:53:18 -0700 mailte J Ottery folgendes: Using windows XP and TCP/IP network. I install PostgreSQL on a client PC and put the data files on a networked drive (instead of the local drive). Postgres

Re: [GENERAL] PostgresSQL on a networked drive with multiple users

2008-04-11 Thread Raymond O'Donnell
On 11/04/2008 09:58, J Ottery wrote: Thanks Craig for making me look like an idiot. I feel bad now. When I posted I suspected that what you have just replied with was the case. I'm sure that wasn't Craig's intent. I'd hazard a guess that you've been using Access or a similar

Re: [GENERAL] Date / interval question

2008-04-11 Thread Rodrigo E. De León Plicet
On Thu, Apr 10, 2008 at 10:26 PM, kevin kempter [EMAIL PROTECTED] wrote: However I'm stumped [er how to get the number of months from 09/01/2007 thru 01/01/2007 select extract(month from (age(date '2007-1-1', date '2006-9-1'))); -- Sent via pgsql-general mailing list

[GENERAL] Operator COMMUTATOR - how does postgresql use this information

2008-04-11 Thread Obe, Regina
Does PostgreSQL use the COMMUTATOR property of an operator to determine if flip-flopped arguments can be collapsed. I used to think it did until someone pointed it doesn't - For example in the below SELECT b.* FROM boszip b INNER JOIN landparcels l ON (b.the_geom l.the_geom AND l.the_geom

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Craig Ringer
Pavan Deolasee wrote: I wonder if it would make sense to add support to mount database in *read-only* mode from multiple servers though. I am thinking about data warehouse kind of operations where multiple servers can be used answer read-only queries. Is there a use case for such applications

[GENERAL] PostgreSQL Processes on a linux box

2008-04-11 Thread Stefan Sturm
Hello, altered a database using DBVisualizer. When I hit execute, DBVisualizer stoped working and no I have two processes on my server: postgres 30873 0.0 0.7 46552 7124 ?Ss 12:33 0:01 postgres: postgres dbName 10.0.1.198(53658) ALTER TABLE waiting postgres 31007 0.0 0.6

[GENERAL] createdb: database creation failed: ERROR: encoding LATIN1 does not match server's locale en_GB.UTF-8

2008-04-11 Thread Glyn Astill
When trying to specify an encoding to initdb I get: createdb: database creation failed: ERROR: encoding LATIN1 does not match server's locale en_GB.UTF-8 8.2 Used to let us create any encoding in initdb. I see that it was in the todo to make this change, but how do I create my database in

Re: [GENERAL] BD removed

2008-04-11 Thread Alvaro Herrera
Miguel A. Lopera Tejero escribió: I need some help. We have a Web application connecting to a postgresql 8.2 database on Windows Server 2003. According to the log, we logged on the server using a remote control desktop, after uninstalling Tomcat we installed a new Tomcat version. After that,

Re: [GENERAL] Problem after VACUUM ANALYZE

2008-04-11 Thread mljv
Hi all, dear Richard, your mail about my configuration parameter were the right hint, but i am still struggling with the problem. i will appreciate if you or somebody else can help me even further. After some investigation i got some new results to my problem. The following query is not

Re: [GENERAL] Date / interval question

2008-04-11 Thread A. Kretschmer
am Thu, dem 10.04.2008, um 21:26:14 -0600 mailte kevin kempter folgendes: I can get the number of days since the start of the fiscal year like this: # select date '01/01/2007' - date '09/01/2006' as interval; interval -- 122 (1 row) However I'm stumped [er how to get

Re: [GENERAL] createdb: database creation failed: ERROR: encoding LATIN1 does not match server's locale en_GB.UTF-8

2008-04-11 Thread Glyn Astill
This is sorted now chaps, I was missing a system locale. ta Glyn - Original Message From: Glyn Astill [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Friday, 11 April, 2008 2:59:56 PM Subject: [GENERAL] createdb: database creation failed: ERROR: encoding LATIN1 does not

Re: [GENERAL] Operator COMMUTATOR - how does postgresql use this information

2008-04-11 Thread Tom Lane
Obe, Regina [EMAIL PROTECTED] writes: Does PostgreSQL use the COMMUTATOR property of an operator to determine if flip-flopped arguments can be collapsed. No. In recent releases we don't even bother to look for simple duplicate clauses (it's seldom worth the cycles), let alone clauses that

[GENERAL] tsearch2 and hyphenated terms

2008-04-11 Thread Reece Hart
I'd like to use tsearch2 to index protein and gene names. Unfortunately, such names are written inconsistently and sometimes with hyphens. For example, MCL-1 and MCL1 are semantically equivalent but with the default parser and to_tsvector, I see this: [EMAIL PROTECTED] select

Re: [GENERAL] PostgreSQL Processes on a linux box

2008-04-11 Thread Andrew Sullivan
On Fri, Apr 11, 2008 at 03:09:43PM +0200, Stefan Sturm wrote: DBVisualizer stoped working and no I have two processes on my server: postgres 30873 0.0 0.7 46552 7124 ?Ss 12:33 0:01 postgres: postgres dbName 10.0.1.198(53658) ALTER TABLE waiting postgres 31007 0.0 0.6 46708

Re: [GENERAL] PostgreSQL Processes on a linux box

2008-04-11 Thread Scott Marlowe
On Fri, Apr 11, 2008 at 7:09 AM, Stefan Sturm [EMAIL PROTECTED] wrote: Hello, altered a database using DBVisualizer. When I hit execute, DBVisualizer stoped working and no I have two processes on my server: postgres 30873 0.0 0.7 46552 7124 ?Ss 12:33 0:01 postgres: postgres

Re: [GENERAL] tsearch2 and hyphenated terms

2008-04-11 Thread Tom Lane
Reece Hart [EMAIL PROTECTED] writes: For the purposes of indexing these names, I suspect I'd get the majority of cases by removing a hyphen when it's followed by 1 or 2 chars from [a-zA-Z0-9]. Does that require a custom parser? Yeah, looks like it: regression=# select * from ts_debug('MCL1

Re: [GENERAL] tsearch2 and hyphenated terms

2008-04-11 Thread Oleg Bartunov
We have the same problem with names in astronomy, so we implemented dict_regex http://vo.astronet.ru/arxiv/dict_regex.html Check it out ! Oleg On Thu, 10 Apr 2008, Reece Hart wrote: I'd like to use tsearch2 to index protein and gene names. Unfortunately, such names are written inconsistently

[GENERAL] SQL injection, php and queueing multiple statement

2008-04-11 Thread Ivan Sergio Borgonovo
Is there a switch (php side or pg side) to avoid things like: pg_query(select id from table1 where a=$i); into becoming pg_query(select id from table1 where a=1 and 1=1; do something nasty; -- ); So that every pg_query(...) can contain no more than one statement? thanks -- Ivan Sergio

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-11 Thread Adam Rich
Is there a switch (php side or pg side) to avoid things like: pg_query(select id from table1 where a=$i); into becoming pg_query(select id from table1 where a=1 and 1=1; do something nasty; -- ); Ideally, you'd use this: pg_query_params('select id from table1 where a=$1', array($i));

Re: [GENERAL] PostgreSQL Processes on a linux box

2008-04-11 Thread Stefan Sturm
Hello, Am 11.04.2008 um 18:41 schrieb Andrew Sullivan: On Fri, Apr 11, 2008 at 03:09:43PM +0200, Stefan Sturm wrote: DBVisualizer stoped working and no I have two processes on my server: postgres 30873 0.0 0.7 46552 7124 ?Ss 12:33 0:01 postgres: postgres dbName

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-11 Thread Chris Browne
[EMAIL PROTECTED] (Ivan Sergio Borgonovo) writes: Is there a switch (php side or pg side) to avoid things like: pg_query(select id from table1 where a=$i); into becoming pg_query(select id from table1 where a=1 and 1=1; do something nasty; -- ); So that every pg_query(...) can contain

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-11 Thread Ivan Sergio Borgonovo
On Fri, 11 Apr 2008 14:27:09 -0500 Adam Rich [EMAIL PROTECTED] wrote: Is there a switch (php side or pg side) to avoid things like: pg_query(select id from table1 where a=$i); into becoming pg_query(select id from table1 where a=1 and 1=1; do something nasty; -- ); Ideally,

Re: [GENERAL] PostgreSQL Processes on a linux box

2008-04-11 Thread Erik Jones
On Apr 11, 2008, at 4:23 PM, Stefan Sturm wrote: Hello, Am 11.04.2008 um 18:41 schrieb Andrew Sullivan: On Fri, Apr 11, 2008 at 03:09:43PM +0200, Stefan Sturm wrote: DBVisualizer stoped working and no I have two processes on my server: postgres 30873 0.0 0.7 46552 7124 ?Ss

[GENERAL] Deleting row in 7.4 takes for ever

2008-04-11 Thread Bharat Patel
Hello, I'm new to postgres and the work of DB's. I'm running postres 7.4 on RHLinux 3. I have a table that has 5.4 million rows of data in it. 4.6 million of these rows are just administrative messages and not necessary so I'd like to delete them. If I try and delete them, it takes 69

Re: [GENERAL] Deleting row in 7.4 takes for ever

2008-04-11 Thread Tom Lane
Bharat Patel [EMAIL PROTECTED] writes: I have a table that has 5.4 million rows of data in it. 4.6 million of these rows are just administrative messages and not necessary so I'd like to delete them. If I try and delete them, it takes 69 minutes to delete ~650K rows. I'm betting on an

Re: [GENERAL] tsearch2 and hyphenated terms

2008-04-11 Thread Reece Hart
On Fri, 2008-04-11 at 22:07 +0400, Oleg Bartunov wrote: We have the same problem with names in astronomy, so we implemented dict_regex http://vo.astronet.ru/arxiv/dict_regex.html Check it out ! Oleg- This gets me a lot closer. Thank you. I have two remaining problems. The first problem is

[GENERAL] Problem. createdb: could not connect to database postgres: could not connect to server: No such file or directory

2008-04-11 Thread Jaisen N.D.
Hai, I use Debian Etch. I have a problem with postgresql 8.1. I have uninstalled the postgresql-8.3, which I was took from debian back ports, removed its configuration files, and the user postgres also. Then installed postgresql-8.1. But when I started to create a database, it shows some message

[GENERAL] Problems in PITR backuprecovery

2008-04-11 Thread Andrea
Hi all, i'm trying to setup PITR on my postgresql ( i run version 1.8.11 ); Following the docs and tips from the list this is what i made: 1) set up a crontab which copys the last-created WAL file in /home/postgres/WAL 2) set up a shell-script as a the archive_command: it copyes WAL files from