pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed7.1 feature?
2+ messages / 2 participants
[nested] [flat]
* 7.1 feature?
@ 2000-12-28 15:44 Kaare Rasmussen <kar@webline.dk>
0 siblings, 1 reply; 2+ messages in thread
From: Kaare Rasmussen @ 2000-12-28 15:44 UTC (permalink / raw)
To: pgsql-sql
I need to do something like this:
SELECT n.name FROM
(SELECT p.contact_seq AS contact_seq, p.lastname||', '||p.firstname AS name
FROM person p
UNION
SELECT co.name AS name FROM company co) n;
Of course there's more; this is cut from the original select.
But PostgreSQL complains about SELECT (i guess it's the SELECT in the
subquery)
In the dox I read:
A FROM item can also be a parenthesized sub-SELECT (note that an alias clause
is required for a sub-SELECT!). This is an extremely handy feature since it's
the only way to get multiple levels of grouping, aggregation, or sorting in a
single query.
Is this a 7.1 feature? Or is my typing wrong?
And will 7.1 support unions in subselects like above?
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 14.00-18.00 Email: kar@webline.dk
2000 Frederiksberg Lørdag 11.00-17.00 Web: www.suse.dk
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: 7.1 feature?
@ 2000-12-28 16:18 Tom Lane <tgl@sss.pgh.pa.us>
parent: Kaare Rasmussen <kar@webline.dk>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2000-12-28 16:18 UTC (permalink / raw)
To: Kaare Rasmussen <kar@webline.dk>; +Cc: pgsql-sql
Kaare Rasmussen <kar@webline.dk> writes:
> In the dox I read:
You're reading the 7.1 docs. 7.0 docs live at
http://www.postgresql.org/users-lounge/docs/7.0/postgres/postgres.htm
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-12-28 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-28 15:44 7.1 feature? Kaare Rasmussen <kar@webline.dk>
2000-12-28 16:18 ` Tom Lane <tgl@sss.pgh.pa.us>
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