feature suggestion

Lists: pgsql-hackers
From: "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br>
To: pgsql-hackers(at)postgresql(dot)org
Subject: feature suggestion
Date: 2007-07-31 19:33:28
Message-ID: 5e126fe30707311233q6800df98l6f9956a023593a3d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

People,

I'd like to suggest you guys to implement a new feature.
Actually is an alias for a existent feature.

Unstead of having to type all the insert syntax, using ("column") names, you
could do the same as MySQL does.
for example:

INSERT INTO Table SET
"Field1" = 'text',
"Field2" = 'text';

So it would make it easier and faster to develop applications using Postgre.

Thanks.
Rafael


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Rafael Azevedo <rafael(at)webpro(dot)com(dot)br>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: feature suggestion
Date: 2007-07-31 19:52:49
Message-ID: 200707311952.l6VJqn425011@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rafael Azevedo wrote:
> People,
>
> I'd like to suggest you guys to implement a new feature.
> Actually is an alias for a existent feature.
>
> Unstead of having to type all the insert syntax, using ("column") names, you
> could do the same as MySQL does.
> for example:
>
> INSERT INTO Table SET
> "Field1" = 'text',
> "Field2" = 'text';
>
> So it would make it easier and faster to develop applications using Postgre.

There is an SQL standard way to do this and we have no intention of
extending that. If you want standard code, use the standard syntax.
MySQL, if it supports this, is just encouraging you to write
non-standard SQL. You can complain to them.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: feature suggestion
Date: 2007-07-31 23:12:06
Message-ID: 87sl74yxq1.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br> writes:

> Unstead of having to type all the insert syntax, using ("column") names, you
> could do the same as MySQL does.
> for example:
>
> INSERT INTO Table SET
> "Field1" = 'text',
> "Field2" = 'text';
>
> So it would make it easier and faster to develop applications using Postgre.

I'm a bit mystified here. What exactly about this syntax is easier or faster?
You still have to list all the column names. It looks like it would require
just as much typing as the regular syntax, no?

Or is it that you get to reuse the same string you use for doing an update?

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Rafael Azevedo <rafael(at)webpro(dot)com(dot)br>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: feature suggestion
Date: 2007-07-31 23:18:34
Message-ID: 200707312318.l6VNIY912113@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Gregory Stark wrote:
> "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br> writes:
>
> > Unstead of having to type all the insert syntax, using ("column") names, you
> > could do the same as MySQL does.
> > for example:
> >
> > INSERT INTO Table SET
> > "Field1" = 'text',
> > "Field2" = 'text';
> >
> > So it would make it easier and faster to develop applications using Postgre.
>
> I'm a bit mystified here. What exactly about this syntax is easier or faster?
> You still have to list all the column names. It looks like it would require
> just as much typing as the regular syntax, no?
>
> Or is it that you get to reuse the same string you use for doing an update?

As far as I can see, the _feature_ is matching MySQL optional
non-standard syntax.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: feature suggestion
Date: 2007-08-01 00:17:26
Message-ID: 5e126fe30707311717t1a9eaa40w56833a7673ff6835@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Imagine that you have about 30 fields.
Ok, then your first SQL is done.
Now, you just have to add 10 more fields.
Its very easy to get lost. If we have this implementation, you could just
add

Field31 = 'text',
Field32 = 'text'
...
wherever you want.

This is just a PLUS. I just don't see any problem by doing this.
Even knowing that this is not Standard SQL-Syntax, I just see this as a
benefit feature.

Another reason is that we have more people migrating from MySQL to Postgre
than any other database server. People don't migrate to Postgre from Oracle.
Hardly from MS SQL Server.

It just makes easier to migrate users from other db servers.
And this is sure not hard to implement.

Today its easier to migrate to PostgreSQL from MySQL than from PostgreSQL to
MySQL.

In few words I have given you more reason to add this feature than not to
add it.

Think about it.

2007/7/31, Rafael Azevedo <rafael(at)webpro(dot)com(dot)br>:
>
> Yes it is. And it makes easier to migrate from MySQL servers to
> PostgreSQL.
> Today its easier to migrate to MySQL from PostgreSQL than from PostgreSQL
> to MySQL.
>
>
> 2007/7/31, Bruce Momjian <bruce(at)momjian(dot)us>:
> >
> > Gregory Stark wrote:
> > > "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br > writes:
> > >
> > > > Unstead of having to type all the insert syntax, using ("column")
> > names, you
> > > > could do the same as MySQL does.
> > > > for example:
> > > >
> > > > INSERT INTO Table SET
> > > > "Field1" = 'text',
> > > > "Field2" = 'text';
> > > >
> > > > So it would make it easier and faster to develop applications using
> > Postgre.
> > >
> > > I'm a bit mystified here. What exactly about this syntax is easier or
> > faster?
> > > You still have to list all the column names. It looks like it would
> > require
> > > just as much typing as the regular syntax, no?
> > >
> > > Or is it that you get to reuse the same string you use for doing an
> > update?
> >
> > As far as I can see, the _feature_ is matching MySQL optional
> > non-standard syntax.
> >
> > --
> > Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> > EnterpriseDB http://www.enterprisedb.com
> >
> > + If your life is a hard drive, Christ can be your backup. +
> >
>


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br>
Subject: Re: feature suggestion
Date: 2007-08-01 02:25:02
Message-ID: 200707311925.03345.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rafael,

> This is just a PLUS. I just don't see any problem by doing this.
> Even knowing that this is not Standard SQL-Syntax, I just see this as a
> benefit feature.

Our project has a policy of upholding the SQL standard whereever possible.
For that reason, we don't approve non-standard syntax just for reasons of
accessibility. Any non-standard syntax we approve needs to add
significant extra functionality to the DBMS, not just convenience, and
certainly not because MySQL does it.

"Standards are important" is one of the themes of PostgreSQL which
differentiates us from MySQL.

> Another reason is that we have more people migrating from MySQL to
> Postgre than any other database server. People don't migrate to Postgre
> from Oracle. Hardly from MS SQL Server.

You're mistaken. I think we get more migrations from Oracle than from
MySQL. And quite a few from DB2 and Informix.

--
--Josh

Josh Berkus
PostgreSQL @ Sun
San Francisco


From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: feature suggestion
Date: 2007-08-01 03:13:15
Message-ID: b42b73150707312013o6df39a2apb860b82afe90b098@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 8/1/07, Rafael Azevedo <rafael(at)webpro(dot)com(dot)br> wrote:
> Imagine that you have about 30 fields.
> Ok, then your first SQL is done.
> Now, you just have to add 10 more fields.
> Its very easy to get lost. If we have this implementation, you could just
> add
>
> Field31 = 'text',
> Field32 = 'text'

I have to admit this syntax has a lot of advantages over the
insert...values statement, especially in dynamic sql situations. That
being said, more and more I just write queries insert..select which
would be an awkward fit. mysql compatibility is usually pretty poor
justification of a feature (they have a million ways to do everything)
and things have to stand on general merit.

It is really quite unfortunate the way certain aspects of the sql
standard evolved (indirectly causing these types of issues) but that
is a topic for another day :)

merlin


From: "Rafael Azevedo" <rafael(at)webpro(dot)com(dot)br>
To: josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: feature suggestion
Date: 2007-08-01 03:13:57
Message-ID: 5e126fe30707312013j211ef876r556cb06c37cede6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Well. Ok.
Then I'll just do it myself.
Just thought it would be good for thousands of users.
As I said, it was just a suggestion.
I surely aint the only one who ever thought about it.

Thanks anyway.

2007/7/31, Josh Berkus <josh(at)agliodbs(dot)com>:
>
> Rafael,
>
> > This is just a PLUS. I just don't see any problem by doing this.
> > Even knowing that this is not Standard SQL-Syntax, I just see this as a
> > benefit feature.
>
> Our project has a policy of upholding the SQL standard whereever possible.
> For that reason, we don't approve non-standard syntax just for reasons of
> accessibility. Any non-standard syntax we approve needs to add
> significant extra functionality to the DBMS, not just convenience, and
> certainly not because MySQL does it.
>
> "Standards are important" is one of the themes of PostgreSQL which
> differentiates us from MySQL.
>
> > Another reason is that we have more people migrating from MySQL to
> > Postgre than any other database server. People don't migrate to Postgre
> > from Oracle. Hardly from MS SQL Server.
>
> You're mistaken. I think we get more migrations from Oracle than from
> MySQL. And quite a few from DB2 and Informix.
>
> --
> --Josh
>
> Josh Berkus
> PostgreSQL @ Sun
> San Francisco
>

--
Atenciosamente,

Rafael Azevedo
.: Diretor
:: WEBPRO SOLUÇÕES DIGITAIS
:: Telefone: 51 3266.3446
:: Celular: 51 9243.9893
:: http://www.webpro.com.br
:: Email: rafael(at)webpro(dot)com(dot)br
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Conheça o MAILMAN, Solução em E-mail Marketing
:: http://www.mailman.com.br/