From: | Ray Stell <stellr(at)cns(dot)vt(dot)edu> |
---|---|
To: | info(at)axier(dot)se |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to Examine a view |
Date: | 2006-09-27 20:27:25 |
Message-ID: | 20060927202725.GA13313@cns.vt.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
is this what you mean?
testdb=# \d foo_view
View "public.foo_view"
Column | Type | Modifiers
--------+-----------------------+-----------
x | character varying(20) |
stuff | text |
y | character varying(20) |
View definition:
SELECT a.x, (a.x::text || ' :'::text) || substr(b.y::text, 1, 10) AS stuff, b.y FROM foo1 a, foo2 b;
On Mon, Sep 25, 2006 at 08:44:33AM -0700, info(at)axier(dot)se wrote:
> I have setup a view consisting of two tables and some compound fields.
> Now I would like from the client perspective see what those compound
> fields actually are originally.
>
> Let's (for simplicity I have inlcuded only one table) say we have:
> CREATE OR REPLACE VIEW clientview AS
> SELECT c.clientid, (c.orderer_name::text || ' :'::text) ||
> substr(c.occasion::text, 1, 10) AS "Order occasion", c.customerid
> FROM client c
>
> Is it possible to query postgres to tell me what field names and field
> types "Order occasion" really consists of?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
--
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-09-27 20:44:36 | Re: [GENERAL] Restart after power outage: createdb |
Previous Message | Chris Browne | 2006-09-27 20:26:12 | Re: PostgreSQL HA questions |