FW: tablename.columnname support

From: "vijayendra mohan agrawal" <vijayendra(dot)agrawal(at)wipro(dot)com>
To: "PostGre SQL Mailing List" <pgsql-admin(at)postgresql(dot)org>
Subject: FW: tablename.columnname support
Date: 2000-09-17 06:06:56
Message-ID: 004901c0206d$7ba35640$2a14a8c0@Protea.wipinfo.soft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

-----Original Message-----
From: Vijayendra M Agrawal [mailto:vijayendra(dot)agrawal(at)wipro(dot)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(at)hub(dot)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?

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2000-09-17 13:02:57 Re: libpq errors when makeing postgres 7.0.2...
Previous Message Jerome Slangen 2000-09-16 15:59:48 Re: tablename.columnname support