From: Hitoshi Harada on
2010/3/9 Jaime Casanova <jcasanov(a)systemguards.com.ec>:
> On Mon, Mar 8, 2010 at 4:17 AM, Pierre C <lists(a)peufeu.com> wrote:
>>
>>> My opinion is that PostgreSQL should accept any MySQL syntax and return
>>> warnings. I believe that we should access even innodb syntax and turn it
>>> immediately into PostgreSQL tables. This would allow people with no
>>> interest in SQL to migrate from MySQL to PostgreSQL without any harm.
>>
>> A solution would be a SQL proxy (a la pgpool) with query rewriting.
>>
>
> This sounds like a better idea...

Could parser & rewriter hook be another solution here?
I'm completely against the wrong GROUP BY syntax from MySQL, but it is
also true that SQL is only an interface.

--
Hitoshi Harada

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Robert Haas on
On Mon, Mar 8, 2010 at 12:10 PM, David Fetter <david(a)fetter.org> wrote:
> On Mon, Mar 08, 2010 at 11:58:20AM -0500, Jaime Casanova wrote:
>> On Mon, Mar 8, 2010 at 4:17 AM, Pierre C <lists(a)peufeu.com> wrote:
>> >
>> >> My opinion is that PostgreSQL should accept any MySQL syntax and
>> >> return warnings. I believe that we should access even innodb
>> >> syntax and turn it immediately into PostgreSQL tables. This would
>> >> allow people with no interest in SQL to migrate from MySQL to
>> >> PostgreSQL without any harm.
>> >
>> > A solution would be a SQL proxy (a la pgpool) with query
>> > rewriting.
>>
>> This sounds like a better idea...
>
> Aside from that little "halting problem" issue, it sounds wonderful.
> You do know that SQL is Turing-complete, right?

That seems largely irrelevant to the problem at hand. It's not
impossible to do syntactic transformations from one Turing-complete
langauge to another; if it were, there could be no such thing as a
compiler.

....Robert

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: David Fetter on
On Mon, Mar 08, 2010 at 12:18:31PM -0500, Robert Haas wrote:
> On Mon, Mar 8, 2010 at 12:10 PM, David Fetter <david(a)fetter.org> wrote:
> > On Mon, Mar 08, 2010 at 11:58:20AM -0500, Jaime Casanova wrote:
> >> On Mon, Mar 8, 2010 at 4:17 AM, Pierre C <lists(a)peufeu.com> wrote:
> >> >
> >> >> My opinion is that PostgreSQL should accept any MySQL syntax
> >> >> and return warnings. I believe that we should access even
> >> >> innodb syntax and turn it immediately into PostgreSQL tables.
> >> >> This would allow people with no interest in SQL to migrate
> >> >> from MySQL to PostgreSQL without any harm.
> >> >
> >> > A solution would be a SQL proxy (a la pgpool) with query
> >> > rewriting.
> >>
> >> This sounds like a better idea...
> >
> > Aside from that little "halting problem" issue, it sounds
> > wonderful. You do know that SQL is Turing-complete, right?
>
> That seems largely irrelevant to the problem at hand. It's not
> impossible to do syntactic transformations from one Turing-complete
> langauge to another; if it were, there could be no such thing as a
> compiler.

MySQL's SQL isn't Turing complete.

Cheers,
David.
--
David Fetter <david(a)fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter(a)gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Robert Haas on
On Mon, Mar 8, 2010 at 12:43 PM, David Fetter <david(a)fetter.org> wrote:
> On Mon, Mar 08, 2010 at 12:18:31PM -0500, Robert Haas wrote:
>> On Mon, Mar 8, 2010 at 12:10 PM, David Fetter <david(a)fetter.org> wrote:
>> > On Mon, Mar 08, 2010 at 11:58:20AM -0500, Jaime Casanova wrote:
>> >> On Mon, Mar 8, 2010 at 4:17 AM, Pierre C <lists(a)peufeu.com> wrote:
>> >> >
>> >> >> My opinion is that PostgreSQL should accept any MySQL syntax
>> >> >> and return warnings. I believe that we should access even
>> >> >> innodb syntax and turn it immediately into PostgreSQL tables.
>> >> >> This would allow people with no interest in SQL to migrate
>> >> >> from MySQL to PostgreSQL without any harm.
>> >> >
>> >> > A solution would be a SQL proxy (a la pgpool) with query
>> >> > rewriting.
>> >>
>> >> This sounds like a better idea...
>> >
>> > Aside from that little "halting problem" issue, it sounds
>> > wonderful.  You do know that SQL is Turing-complete, right?
>>
>> That seems largely irrelevant to the problem at hand.  It's not
>> impossible to do syntactic transformations from one Turing-complete
>> langauge to another; if it were, there could be no such thing as a
>> compiler.
>
> MySQL's SQL isn't Turing complete.

It still doesn't matter. Turing-completeness does not preclude syntax
transformation. Non-Turing completeness, even less so.

....Robert

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Andrew Dunstan on


Robert Haas wrote:
>> You do know that SQL is Turing-complete, right?
>>
>
> That seems largely irrelevant to the problem at hand. It's not
> impossible to do syntactic transformations from one Turing-complete
> langauge to another; if it were, there could be no such thing as a
> compiler.
>
>
>

If we were engaged in an academic exercise this might be interesting.
But we aren't. The fact that one can do something is not an argument for
actually doing it.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers