Thread: tablename.columnname support
Hi all, say, we have a table created by : create table a ( a char(11), b char(22) ); For adding data into table 'a', ORACLE supports column name format as tablename.columnname as follows : insert into a ( a.a, a.b ) values ( 'xyz', 'abc') ; But, PostGreSQL doesn't support... It gives parse error as follows : ERROR: parser: parse error at or near "." Can this feature be added in PostGreSQL ??? Thank You, Best Regards, Vijay ************************************************************ Vijayendra Mohan Agrawal Wipro Technologies 26, Hosur Main Road, Bommanhalli, Bangalore-560068, India Tel: 91-80-5722296 Extn:3076 Fax: 91-80-5722696 E-mail : Vijayendra.Agrawal@wipro.com **************************************************************
On Sat, 16 Sep 2000, vijayendra mohan agrawal wrote: > Hi all, > > say, we have a table created by : > create table a ( a char(11), b char(22) ); > > For adding data into table 'a', ORACLE supports column name format as > tablename.columnname as follows : > insert into a ( a.a, a.b ) values ( 'xyz', 'abc') ; > > But, PostGreSQL doesn't support... It gives parse error as follows : > ERROR: parser: parse error at or near "." > > Can this feature be added in PostGreSQL ??? stupid question, but why would you use that format instead of doing: INSERT INTO a ( a, b ) VALUES ( 'xyz', 'abc' ); Why the tablename. in front?
The Hermit Hacker wrote: > > On Sat, 16 Sep 2000, vijayendra mohan agrawal wrote: > > > Hi all, > > > > say, we have a table created by : > > create table a ( a char(11), b char(22) ); > > > > For adding data into table 'a', ORACLE supports column name format as > > tablename.columnname as follows : > > insert into a ( a.a, a.b ) values ( 'xyz', 'abc') ; > > > > But, PostGreSQL doesn't support... It gives parse error as follows : > > ERROR: parser: parse error at or near "." > > > > Can this feature be added in PostGreSQL ??? > > stupid question, but why would you use that format instead of doing: > > INSERT INTO a ( a, b ) VALUES ( 'xyz', 'abc' ); > > Why the tablename. in front? Just for the example: As I do for simple web form dump to a database, by finding the inputs related to earch table using that prefix (sugar, doing this in Lua can automatically create an associative array :). - Jay