Re: [HACKERS] psql feature thought

2006-05-16 Thread Mark Dilger
Joshua D. Drake wrote: > Hello, > > I was dinking around wand came across something that may (or may not be > useful). > > What if single line statements that were seperated by ; within psql were > implicitly within a transaction? > > E.g; > > postgres=# select * from foo; update foo set bar =

Re: [HACKERS] psql feature thought

2006-05-16 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > On May 16, 2006, at 14:17 , Tom Lane wrote: >> [1] Mostly. There's the infamous continued-string-literal >> construct... > Are you referring to this? > ^ > test=# SELECT 'foo' > test-# 'bar'; -- valid Yeah. It seems wei

Re: [HACKERS] psql feature thought

2006-05-16 Thread Michael Glaesemann
On May 16, 2006, at 14:17 , Tom Lane wrote: [1] Mostly. There's the infamous continued-string-literal construct... Are you referring to this? est=# SELECT 'foo''bar'; -- invalid ERROR: syntax error at or near "'bar'" at character 17 LINE 1: SELECT 'foo''bar';

Re: [HACKERS] psql feature thought

2006-05-15 Thread Thomas Hallgren
Tom Lane wrote: Quite aside from the compatibility and how-useful-is-it-really arguments, I think this'd be a bad idea in the abstract. SQL is not one of those languages that assigns semantic significance to the shape of whitespace [1]. We should NOT introduce any such concept into psql, becau

Re: [HACKERS] psql feature thought

2006-05-15 Thread Joshua D. Drake
Tom Lane wrote: Michael Glaesemann <[EMAIL PROTECTED]> writes: What use case are you envisioning? Just saving ... *counts ... 14 keystrokes in this case? (I'm not saying there *isn't* a use case. I just don't see a big benefit here.) Quite aside from the compatibility and how-useful-is-it-r

Re: [HACKERS] psql feature thought

2006-05-15 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > What use case are you envisioning? Just saving ... *counts ... 14 > keystrokes in this case? (I'm not saying there *isn't* a use case. I > just don't see a big benefit here.) Quite aside from the compatibility and how-useful-is-it-really argumen

Re: [HACKERS] psql feature thought

2006-05-15 Thread Michael Glaesemann
On May 16, 2006, at 13:42 , Joshua D. Drake wrote: Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: What if single line statements that were seperated by ; within psql were implicitly within a transaction? Seems like this would risk breaking a lot of scripts. I wouldn't assum

Re: [HACKERS] psql feature thought

2006-05-15 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: What if single line statements that were seperated by ; within psql were implicitly within a transaction? Seems like this would risk breaking a lot of scripts. I wouldn't assume that it would be a default feature of course. Perhap

Re: [HACKERS] psql feature thought

2006-05-15 Thread Qingqing Zhou
""Joshua D. Drake"" <[EMAIL PROTECTED]> wrote > > What if single line statements that were seperated by ; within psql were > implicitly within a transaction? > > E.g; > > postgres=# select * from foo; update foo set bar = 'baz'; delete from bing; > > Would be a single transaction ? The begin/commi

Re: [HACKERS] psql feature thought

2006-05-15 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > What if single line statements that were seperated by ; within psql were > implicitly within a transaction? Seems like this would risk breaking a lot of scripts. regards, tom lane ---(end of broadcas

[HACKERS] psql feature thought

2006-05-15 Thread Joshua D. Drake
Hello, I was dinking around wand came across something that may (or may not be useful). What if single line statements that were seperated by ; within psql were implicitly within a transaction? E.g; postgres=# select * from foo; update foo set bar = 'baz'; delete from bing; Would be a sin