Re: Export a column in a view without "announcing" it?
От | Dawid Kuroczko |
---|---|
Тема | Re: Export a column in a view without "announcing" it? |
Дата | |
Msg-id | 758d5e7f050129120714c90931@mail.gmail.com обсуждение исходный текст |
Ответ на | Export a column in a view without "announcing" it? ("Frank D. Engel, Jr." <fde101@fjrhome.net>) |
Список | pgsql-general |
On Wed, 26 Jan 2005 11:10:07 -0500, Frank D. Engel, Jr. <fde101@fjrhome.net> wrote: > I'm fairly certain there is currently no way to do this, but it would So am I. :) > Is there any way to expose a column in a view without "announcing" the > fact that it is there? Specifically, in order to support updatable > cursors on views (faked ones, using the ODBC driver), it is necessary > to include the underlying table's OID and CTID columns in the view; but > the client software I am trying to use then chokes on there being a > column named OID (which is present, but hidden, if I use a table). So > basically I would like to do: > > CREATE VIEW aView AS > SELECT x, y, OID, CTID, z, t, ... FROM aTable WHERE condition_met > WITHOUT ANNOUNCING OID, CTID Oh, I think it would be quite useful in non-ODBC world, suppose I have: CREATE VIEW av AS SELECT foo_id, foo_name, foo_bar, foo_baz FROM blah WITHOUT ANNOUNCING foo_id; ...means that I can later do things like: SELECT foo_name FROM av ORDER BY foo_id; ...but also (much more important) use this foo_id in joins! This could be especially useful when doing view-on-a-view. :) Regards, Dawid PS: Though I'm somewhat sceptical towards "WITHOUT ANNOUNCING" syntax.
В списке pgsql-general по дате отправления: