Re: [SQL] COPY FROM query

2007-02-12 Thread Steve Midgley
Hi, For what it's worth, WindowsXP (at least) seems to currently support forward slashes at the OS level, so this Postgres behavior isn't as odd as it might seem. If you enclose your paths with double quote (") marks, Windows will even accept Unix style paths for some instructions on the comm

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Richard Huxton
Ezequias Rodrigues da Rocha wrote: This is delphi. I don't intent you understand but the sql actions are quite simple (I am reading a list of numbers). Well, let's see - the last Pascal I did was in 1986 I think... If not dm.database1.InTransaction then dm.database1.StartTra

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Ezequias Rodrigues da Rocha
Ok you teach me. Thank you and sorry. :( I just want to know why is it occuring. I am pretty sad. Ezequias 2007/2/12, Reinoud van Leeuwen <[EMAIL PROTECTED]>: On Mon, Feb 12, 2007 at 03:08:27PM -0300, Ezequias Rodrigues da Rocha wrote: > I mean really deadlock. Other transactions can't access

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Reinoud van Leeuwen
On Mon, Feb 12, 2007 at 03:08:27PM -0300, Ezequias Rodrigues da Rocha wrote: > I mean really deadlock. Other transactions can't access the database until > the main transaction is complete. What you describe sounds like a blocking lock: one transaction uses a resource and another has to wait unt

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Ezequias Rodrigues da Rocha
This is delphi. I don't intent you understand but the sql actions are quite simple (I am reading a list of numbers). If not dm.database1.InTransaction then dm.database1.StartTransaction; For i:= 0 to memo1.Lines.Count - 1 do Begin // Catching ID

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Scott Marlowe
On Mon, 2007-02-12 at 12:08, Ezequias Rodrigues da Rocha wrote: > I mean really deadlock. Other transactions can't access the database > until the main transaction is complete. A question: > > PostgreSQL doesn't permit multiple transactions concurrently ? Again, that's not a deadlock. A deadlock

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Richard Huxton
Ezequias Rodrigues da Rocha wrote: 2007/2/12, Richard Huxton : Ezequias Rodrigues da Rocha wrote: > I mean really deadlock. Other transactions can't access the database until > the main transaction is complete. A question: > > PostgreSQL doesn't permit multiple transactions concurrently ? PG h

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Ezequias Rodrigues da Rocha
2007/2/12, Richard Huxton : Ezequias Rodrigues da Rocha wrote: > I mean really deadlock. Other transactions can't access the database until > the main transaction is complete. A question: > > PostgreSQL doesn't permit multiple transactions concurrently ? PG has quite good concurrency behaviour.

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Andreas Kretschmer
Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> schrieb: > I mean really deadlock. Other transactions can't access the database until the > main transaction is complete. A question: That's not true. > > PostgreSQL doesn't permit multiple transactions concurrently ? Why not? Show us a complete

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Richard Huxton
Ezequias Rodrigues da Rocha wrote: I mean really deadlock. Other transactions can't access the database until the main transaction is complete. A question: PostgreSQL doesn't permit multiple transactions concurrently ? PG has quite good concurrency behaviour. And "can't access the database" i

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Ezequias Rodrigues da Rocha
I mean really deadlock. Other transactions can't access the database until the main transaction is complete. A question: PostgreSQL doesn't permit multiple transactions concurrently ? Ezequias 2007/2/12, Scott Marlowe <[EMAIL PROTECTED]>: On Mon, 2007-02-12 at 11:43, Ezequias Rodrigues da Roc

Re: [SQL] [ADMIN] Deadlock on transaction

2007-02-12 Thread Scott Marlowe
On Mon, 2007-02-12 at 11:43, Ezequias Rodrigues da Rocha wrote: > Hi list, > > I am curious becouse I am seen my postgresql locking the transactions > when i load a huge (in some case not to huge) numbers of records > 70,000 records. > > Could someone help me with it ? Are sure that what you're

[SQL] Deadlock on transaction

2007-02-12 Thread Ezequias Rodrigues da Rocha
Hi list, I am curious becouse I am seen my postgresql locking the transactions when i load a huge (in some case not to huge) numbers of records 70,000 records. Could someone help me with it ? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= A

RE : [SQL] Sum sets of records

2007-02-12 Thread Sylvain Barrette
Hi, "Group by" is what you're looking for.. select type,sum(value) from MyTable group by type Or for the total only Select sum(case when type='C' then value when type='W' then -value else 0 end) from MyTable hth Sylvain Barrette Architecte et analyste principal, RE/MAX Québec inc. Hi list

Re: [SQL] Sum sets of records

2007-02-12 Thread Bart Degryse
select sum(case when id = 'C' then value else -value end) as total from mytable >>> "Ezequias Rodrigues da Rocha" <[EMAIL PROTECTED]> 2007-02-12 16:41 >>> Hi list, I would like a little help from you to get the sum value of various subsets of my table. My table is like this id | type | value 1

[SQL] Sum sets of records

2007-02-12 Thread Ezequias Rodrigues da Rocha
Hi list, I would like a little help from you to get the sum value of various subsets of my table. My table is like this id | type | value 1 C 10.00 2 C 15.00 3 W5.00 4 W3.00 Where C is credit and w is witdraw. How do I sum all records with C and subtract with

Re: [SQL] COPY FROM query.

2007-02-12 Thread Richard Huxton
Paul Lambert wrote: Phillip Smith wrote: "Having said that, if I switch it to a forward slash it works without error... odd, given that weenblows standard is backslash." Yes, but PostgreSQL uses a back-slash as an escape character, which needs to be used to escape itself at an application lev

Re: [SQL] Password Policy

2007-02-12 Thread Richard Huxton
Ezequias Rodrigues da Rocha wrote: Hi list, Is there any password polity that postgresql implement ? It is possible to put a set all no administrators passwords to = '123456' from times and times ? Has anyone implement a dinamic password autentication (the password changes according the date/m