Re: [HACKERS] autocommit off mode, how does it work?

2003-02-26 Thread Tom Lane
Dave Cramer <[EMAIL PROTECTED]> writes:
> what cvs version are you working with?

CVS tip in either HEAD or REL7_3_STABLE branches works for me.

There are some known issues with autocommit getting turned off
as part of a multi-statement command that's sent to tbe backend
in a single query string.  But your example in psql wouldn't have
triggered that problem.

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


Re: [HACKERS] autocommit off mode, how does it work?

2003-02-26 Thread Dave Cramer
Sorry for the noise, my instance of postgres was broken.

Dave
On Wed, 2003-02-26 at 02:19, Dave Cramer wrote:
> what cvs version are you working with?
> 
> Dave
> On Wed, 2003-02-26 at 01:11, Tom Lane wrote:
> > Dave Cramer <[EMAIL PROTECTED]> writes:
> > > Can someone point me to the documentation for the new autocommit mode
> > > behaviour, I must be doing something wrong
> > 
> > Must be :-(.  I repeated your example as best I could, and it behaved
> > as expected.
> > 
> > << session 1 >>
> > 
> > regression=# set autocommit=off;
> > SET
> > regression=# begin;
> > BEGIN
> > regression=# create table foo (f1 int);
> > CREATE TABLE
> > regression=# insert into foo values (1);
> > INSERT 933631 1
> > regression=# end;
> > COMMIT
> > regression=#
> > 
> > << session 2 >>
> > 
> > regression=# \d foo
> >   Table "public.foo"
> >  Column |  Type   | Modifiers
> > +-+---
> >  f1 | integer |
> > 
> > regression=# select * from foo;
> >  f1
> > 
> >   1
> > (1 row)
> > 
> > 
> > regards, tom lane
-- 
Dave Cramer <[EMAIL PROTECTED]>
Cramer Consulting


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] autocommit off mode, how does it work?

2003-02-25 Thread Dave Cramer
what cvs version are you working with?

Dave
On Wed, 2003-02-26 at 01:11, Tom Lane wrote:
> Dave Cramer <[EMAIL PROTECTED]> writes:
> > Can someone point me to the documentation for the new autocommit mode
> > behaviour, I must be doing something wrong
> 
> Must be :-(.  I repeated your example as best I could, and it behaved
> as expected.
> 
> << session 1 >>
> 
> regression=# set autocommit=off;
> SET
> regression=# begin;
> BEGIN
> regression=# create table foo (f1 int);
> CREATE TABLE
> regression=# insert into foo values (1);
> INSERT 933631 1
> regression=# end;
> COMMIT
> regression=#
> 
> << session 2 >>
> 
> regression=# \d foo
>   Table "public.foo"
>  Column |  Type   | Modifiers
> +-+---
>  f1 | integer |
> 
> regression=# select * from foo;
>  f1
> 
>   1
> (1 row)
> 
> 
>   regards, tom lane
-- 
Dave Cramer <[EMAIL PROTECTED]>
Cramer Consulting


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


Re: [HACKERS] autocommit off mode, how does it work?

2003-02-25 Thread Tom Lane
Dave Cramer <[EMAIL PROTECTED]> writes:
> Can someone point me to the documentation for the new autocommit mode
> behaviour, I must be doing something wrong

Must be :-(.  I repeated your example as best I could, and it behaved
as expected.

<< session 1 >>

regression=# set autocommit=off;
SET
regression=# begin;
BEGIN
regression=# create table foo (f1 int);
CREATE TABLE
regression=# insert into foo values (1);
INSERT 933631 1
regression=# end;
COMMIT
regression=#

<< session 2 >>

regression=# \d foo
  Table "public.foo"
 Column |  Type   | Modifiers
+-+---
 f1 | integer |

regression=# select * from foo;
 f1

  1
(1 row)


regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


[HACKERS] autocommit off mode, how does it work?

2003-02-25 Thread Dave Cramer
Can someone point me to the documentation for the new autocommit mode
behaviour, I must be doing something wrong

I do a set autocommit=off;

begin;
create table foo ...
insert into foo
end;

and if I look for the table foo from another connection, it isn't there?

my source tree is REL7_3_STABLE


-- 
Dave Cramer <[EMAIL PROTECTED]>
Cramer Consulting


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster