Re: [GENERAL] Transactions, PostgreSQL and MS Access front end.

2006-04-23 Thread Karen Hill
Bruce Momjian wrote: > Karen Hill wrote: > > >From Access I'd like to run pass the following from MS Access to > > PostgreSQL 8.1 using VBA: > > > > BEGIN; > > UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345; > > UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7

Re: [GENERAL] Transactions, PostgreSQL and MS Access front end.

2006-04-23 Thread Bruce Momjian
Karen Hill wrote: > >From Access I'd like to run pass the following from MS Access to > PostgreSQL 8.1 using VBA: > > BEGIN; > UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345; > UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534; > COMMIT; > > It won't let me

[GENERAL] Transactions, PostgreSQL and MS Access front end.

2006-04-23 Thread Karen Hill
>From Access I'd like to run pass the following from MS Access to PostgreSQL 8.1 using VBA: BEGIN; UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345; UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534; COMMIT; It won't let me. Any ideas solutions? --

Re: [GENERAL] sudo-like behavior

2006-04-23 Thread Agent M
On Apr 22, 2006, at 1:13 PM, Florian G. Pflug wrote: Why don't you just use "SET SESSION AUTHORIZATION somerole", and then scan the to-be-executel sql scripts for any occurence of "reset session authorization", and ignore the script it matches. Of course you'd need to be a bit carefull to c

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: Stephen Frost wrote: Alright, can you describe *exactly* what you'd want to see then? Is this a new command-line option to psql (perhaps something like -v?)? Or do you need it to be supported by libpq through a new connect-str

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Stephen Frost
* Florian G. Pflug ([EMAIL PROTECTED]) wrote: > Stephen Frost wrote: > >Alright, can you describe *exactly* what you'd want to see then? Is > >this a new command-line option to psql (perhaps something like -v?)? Or > >do you need it to be supported by libpq through a new connect-string > >option

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: I can do that with "alter user set role " too... But I'd like my users to be able to connect as either role "dev" or role "admin", depending on the task they want to do. Alright, can you describe *exactly* what you'd want to s

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Stephen Frost wrote: * Florian G. Pflug ([EMAIL PROTECTED]) wrote: I'd like to be able to connect to postgres, and automatically assume a specific role. Couldn't you just have 'SET ROLE ' in the user's .psqlrc? At least, if that's how they're connecting I think that'd work... I can do that

[GENERAL] Concurrency problem building indexes

2006-04-23 Thread Wes
Postgres: 8.1.3 OS: Mac OS X 10.4.6 I've run into another concurrency issue - parallel building of indexes. When I try to build multiple indexes at a time, I randomly get: ERROR: tuple concurrently updated The following thread talks about this, but there is no answer.

Re: [GENERAL] Performance

2006-04-23 Thread Gregory S. Williamson
Bert -- You don't include some necessary details: What version of postgres ? (8.x is noticably better at that OR / IN stuff I think, at least to some degree) Please include some info about your setup -- what are the settings in the postgres config file (effective_cache_size, random_page_cost

[GENERAL] Postgreql 8.0.3 temporary Table Strange behaviour

2006-04-23 Thread Dany De Bontridder
If you have a look to the following code, I'm trying to work around the limitation about execute, which doesn't accept "select into". So I call the function with a table name as parameter, the function insert a record in a temporary table, retrieve it and return it. The strange thing, is that the

Re: [GENERAL] Automatically assuming a specific role after connecting to pg

2006-04-23 Thread Stephen Frost
* Florian G. Pflug ([EMAIL PROTECTED]) wrote: > I'd like to be able to connect to postgres, and automatically assume a > specific role. Couldn't you just have 'SET ROLE ' in the user's .psqlrc? At least, if that's how they're connecting I think that'd work... Enjoy, Ste

Re: [GENERAL] Automatically assuming a specific role after connecting to pg

2006-04-23 Thread Stephen Frost
* Florian G. Pflug ([EMAIL PROTECTED]) wrote: > I can do that with "alter user set role " too... > But I'd like my users to be able to connect as either role "dev" or > role "admin", depending on the task they want to do. Alright, can you describe *exactly* what you'd want to see then? Is this a

Re: [GENERAL] Automatically assuming a specific role after connecting

2006-04-23 Thread Florian G. Pflug
Tom Lane wrote: "Florian G. Pflug" <[EMAIL PROTECTED]> writes: I'd like to be able to connect to postgres, and automatically assume a specific role. Why don't you just connect as that role to begin with? This seems like a pretty low-value frammish. Because I want each user to have his or