Re: [RDBO] odd select question

2006-08-04 Thread Ron Savage
On Fri, 04 Aug 2006 21:40:31 -0400, John Siracusa wrote: Hi John > reasonable, IMO. MySQL will let you do all sorts of crazy stuff, > select count(*), name, num from foos group by name; > Then you get to guess what value the num column will have in each > row :) Time to update this page, then?:

Re: [RDBO] odd select question

2006-08-04 Thread John Siracusa
On 8/4/06 9:22 PM, Jonathan Vanasco wrote: > works on mysql , not psql > select distinct ip_address from visit order by timestamp_created asc; Yeah, I remember that one now that you mention it. But that's reasonable, IMO. MySQL will let you do all sorts of crazy stuff, e.g., select count(*)

Re: [RDBO] odd select question

2006-08-04 Thread Jonathan Vanasco
On Aug 3, 2006, at 12:20 PM, John Siracusa wrote: > It just literally sticks the word DISTINCT after SELECT. MySQL does a > lot of things differently, but I wasn't aware that this was one of > them. How does it differ in MySQL vs., say, Pg? sorry for the delay- i've been knee deep porti

Re: [RDBO] PATCH: in-lined values for IN without binds

2006-08-04 Thread John Siracusa
On 8/4/06 7:48 PM, Perrin Harkins wrote: > Here's a patch that fixes a problem with how IN queries are handled when > bind values are not used. It was flattening scalar refs into strings > rather than de-referencing them, but only when binds are off. Applied, thanks. > Couldn't figure out where

[RDBO] PATCH: in-lined values for IN without binds

2006-08-04 Thread Perrin Harkins
Hi, Here's a patch that fixes a problem with how IN queries are handled when bind values are not used. It was flattening scalar refs into strings rather than de-referencing them, but only when binds are off. I tried to follow your indentation style. I shifted the bind variations around a bit be

Re: [RDBO] add_relationship(soft => 1)

2006-08-04 Thread John Siracusa
On 8/1/06, John Siracusa <[EMAIL PROTECTED]> wrote: > On 8/1/06 6:43 PM, Danial Pearce wrote: >> create table foo ( >> id serial not null, >> foo text, >> primary key (id) >> ); >> >> create table bar ( >> foo_id int references foo(id), >> bar text, >> primary key (foo