Re: generic insert into table

From: "Scott Marlowe" <smarlowe(at)qwest(dot)net>
To: "Dennis Gearon" <gearond(at)fireserve(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: generic insert into table
Date: 2004-06-07 22:28:35
Message-ID: 1086647315.27200.18.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2004-06-07 at 15:29, Dennis Gearon wrote:
> please CC me, I am on digest
> ---------------------------------
> I have the following code from an application that is 'mysql_centric'. I
> want to make it generic across all databases, if it's possible,
> especially postgres :-)
>
> mysql version:
> INSERT INTO calendar_setting SET setting='colorEvent',value='#C2DCD5';

For SQL 92, that's not supported syntax. I don't recall if something
like it got tossed into the latest SQL 03 standard or not.

> There is no data in this table at this time.
> Isn't this the same as:
> INSERT INTO calendar_setting( 'colorEvent' ) VALUES ( '#C2DCD5');

That's the syntax the SQL 92 spec says to use.

> would this work on all db's?

Probably not. It's non-standard in the old spec, I don't know about the
new one. If it got in the newest spec then it could probably get
committed pretty easily.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2004-06-07 22:31:09 Re: core dump
Previous Message Bill Moran 2004-06-07 22:19:40 Re: core dump