pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedtablename.columnname support
5+ messages / 4 participants
[nested] [flat]
* tablename.columnname support
@ 2000-09-16 07:45 vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
2000-09-16 15:20 ` Re: tablename.columnname support The Hermit Hacker <scrappy@hub.org>
0 siblings, 1 reply; 5+ messages in thread
From: vijayendra mohan agrawal @ 2000-09-16 07:45 UTC (permalink / raw)
To: pgsql-admin
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
**************************************************************
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: tablename.columnname support
2000-09-16 07:45 tablename.columnname support vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
@ 2000-09-16 15:20 ` The Hermit Hacker <scrappy@hub.org>
2000-09-16 15:59 ` Re: tablename.columnname support Jerome Slangen <jslangen@exmachina.net>
0 siblings, 1 reply; 5+ messages in thread
From: The Hermit Hacker @ 2000-09-16 15:20 UTC (permalink / raw)
To: vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>; +Cc: pgsql-admin
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?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: tablename.columnname support
2000-09-16 07:45 tablename.columnname support vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
2000-09-16 15:20 ` Re: tablename.columnname support The Hermit Hacker <scrappy@hub.org>
@ 2000-09-16 15:59 ` Jerome Slangen <jslangen@exmachina.net>
0 siblings, 0 replies; 5+ messages in thread
From: Jerome Slangen @ 2000-09-16 15:59 UTC (permalink / raw)
To: The Hermit Hacker <scrappy@hub.org>; +Cc: vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>; pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* FW: tablename.columnname support
@ 2000-09-17 06:06 vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
2000-09-17 17:16 ` Re: FW: tablename.columnname support Haroldo Stenger <hstenger@adinet.com.uy>
0 siblings, 1 reply; 5+ messages in thread
From: vijayendra mohan agrawal @ 2000-09-17 06:06 UTC (permalink / raw)
To: pgsql-admin
-----Original Message-----
From: Vijayendra M Agrawal [mailto:vijayendra.agrawal@wipro.com]
Sent: Sunday, September 17, 2000 11:24 AM
To: The Hermit Hacker
Subject: RE: [ADMIN] tablename.columnname support
Dear Hermit,
I didn't ask the question just for the sake of asking...
The design in my module is such that for any requests from the client side,
I have to do some DB operation. The operation could be either SELECT,
UPDATE, INSERT or DELETE in the database depending on the request id and the
data in the database. So, I am having a meta-data table in the database,
which will tell me what kind of operation to do on a particular request id,
what are the tables involved, what are the columns involved, what are the
keys for these tables, and what are the relations(join conditions) between
the tables involved. So, here in column names, I am storing columns in the
tablename.columnname format, becuase columns can be from many tables.
Here comes the problem specified in my query earliar...
If you have an idea, ORACLE supports tablename.columnname format in all
INSERT, SELECT, UPDATE and DELETE queries.
Anyway, thanks for your reply...
Thanks and regards,
Vijay
-----Original Message-----
From: The Hermit Hacker [mailto:scrappy@hub.org]
Sent: Saturday, September 16, 2000 8:50 PM
To: vijayendra mohan agrawal
Cc: PostGre SQL Mailing List
Subject: Re: [ADMIN] tablename.columnname support
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?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: FW: tablename.columnname support
2000-09-17 06:06 FW: tablename.columnname support vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
@ 2000-09-17 17:16 ` Haroldo Stenger <hstenger@adinet.com.uy>
0 siblings, 0 replies; 5+ messages in thread
From: Haroldo Stenger @ 2000-09-17 17:16 UTC (permalink / raw)
To: vijayendra.agrawal@wipro.com; pgsql-admin
vijayendra mohan agrawal wrote:
> The design in my module is such that for any requests from the client side,
> I have to do some DB operation. The operation could be either SELECT,
> UPDATE, INSERT or DELETE in the database depending on the request id and the
> data in the database. So, I am having a meta-data table in the database,
> which will tell me what kind of operation to do on a particular request id,
> what are the tables involved, what are the columns involved, what are the
> keys for these tables, and what are the relations(join conditions) between
> the tables involved. So, here in column names, I am storing columns in the
> tablename.columnname format, becuase columns can be from many tables.
I see your point. But couldn't you just strip out the dbname prefix when talking
to PostgreSQL?
Best Regards,
Haroldo.
--
----------------------+------------------------
Haroldo Stenger | hstenger@ieee.org
Montevideo, Uruguay. | hstenger@adinet.com.uy
----------------------+------------------------
Visit UYLUG Web Site: http://www.linux.org.uy
-----------------------------------------------
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2000-09-17 17:16 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-16 07:45 tablename.columnname support vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
2000-09-16 15:20 ` The Hermit Hacker <scrappy@hub.org>
2000-09-16 15:59 ` Jerome Slangen <jslangen@exmachina.net>
2000-09-17 06:06 FW: tablename.columnname support vijayendra mohan agrawal <vijayendra.agrawal@wipro.com>
2000-09-17 17:16 ` Haroldo Stenger <hstenger@adinet.com.uy>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox