FW: tablename.columnname support

Поиск
Список
Период
Сортировка
От vijayendra mohan agrawal
Тема FW: tablename.columnname support
Дата
Msg-id 004901c0206d$7ba35640$2a14a8c0@Protea.wipinfo.soft.net
обсуждение исходный текст
Список 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?



В списке pgsql-admin по дате отправления:

Предыдущее
От: Jerome Slangen
Дата:
Сообщение: Re: tablename.columnname support
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: libpq errors when makeing postgres 7.0.2...