Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
On Thu, Nov 5, 2009 at 12:39 AM, marcin mank wrote: > On Thu, Nov 5, 2009 at 12:31 AM, Richard Broersma > wrote: >> I don't get the same results: > > This is due to my email client breaking the lines. > Try this: http://pastebin.com/f2a0884a1 doh. http://www.pastie.org/684163 Greetings Marcin M

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
On Thu, Nov 5, 2009 at 12:31 AM, Richard Broersma wrote: > I don't get the same results: This is due to my email client breaking the lines. Try this: http://pastebin.com/f2a0884a1 Greetings Marcin Mańk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Andrej
2009/11/5 Richard Broersma : > On Wed, Nov 4, 2009 at 3:18 PM, marcin mank wrote: >> --- >> >> 534678912672195348198342567859761423426853791713924856961537284287419635345286179 >> (1 row) > broersr=> with recursive

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Richard Broersma
On Wed, Nov 4, 2009 at 3:18 PM, marcin mank wrote: >                                         s > --- >  534678912672195348198342567859761423426853791713924856961537284287419635345286179 > (1 row) I don't get the sam

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Greg Stark
On Sun, Nov 1, 2009 at 3:19 PM, Tom Lane wrote: > I think the Oracle guy's version could easily be adapted to PG 8.4 --- > those little rownum subqueries seem to be just a substitute for not > having generate_series(1,9), and everything else is just string-pushing. > Don't have time to try it myse

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Andrej
2009/11/5 marcin mank : > btw2: is SQL with 'with recursive' turing-complete ? Anyone care to > try a Brainf*ck interpreter ? :) Sick, sick puppy! :} Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.ht

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Scott Marlowe
This needs to be published... On Wed, Nov 4, 2009 at 4:18 PM, marcin mank wrote: >> I think the Oracle guy's version could easily be adapted to PG 8.4 --- >> those little rownum subqueries seem to be just a substitute for not >> having generate_series(1,9), and everything else is just string-push

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
> I think the Oracle guy's version could easily be adapted to PG 8.4 --- > those little rownum subqueries seem to be just a substitute for not > having generate_series(1,9), and everything else is just string-pushing. indeed. marcin=# with recursive x( s, ind ) as ( select sud, position( ' ' in s

Re: [GENERAL] sudoku in an sql statement

2009-11-01 Thread Tom Lane
Thomas Kellerer writes: > Merlin Moncure wrote on 31.10.2009 14:32: >> an oracle guy wrote an sql statement that solves a sudoku >> puzzle...using an oracle specific feature. Still, it's pretty neat, >> and an absolute gem of lateral thinking. >> >> http://technology.amis.nl/blog/6404/oracle-rdb

Re: [GENERAL] sudoku in an sql statement

2009-10-31 Thread Thomas Kellerer
Merlin Moncure wrote on 31.10.2009 14:32: an oracle guy wrote an sql statement that solves a sudoku puzzle...using an oracle specific feature. Still, it's pretty neat, and an absolute gem of lateral thinking. http://technology.amis.nl/blog/6404/oracle-rdbms-11gr2-solving-a-sudoku-using-recursiv

Re: [GENERAL] sudoku in an sql statement

2009-10-31 Thread Byran
Really brilliant. 2009/11/1 Merlin Moncure > an oracle guy wrote an sql statement that solves a sudoku > puzzle...using an oracle specific feature. Still, it's pretty neat, > and an absolute gem of lateral thinking. > > > http://technology.amis.nl/blog/6404/oracle-rdbms-11gr2-solving-a-sudoku-u

[GENERAL] sudoku in an sql statement

2009-10-31 Thread Merlin Moncure
an oracle guy wrote an sql statement that solves a sudoku puzzle...using an oracle specific feature. Still, it's pretty neat, and an absolute gem of lateral thinking. http://technology.amis.nl/blog/6404/oracle-rdbms-11gr2-solving-a-sudoku-using-recursive-subquery-factoring merlin -- Sent via p