pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedwith queries
2+ messages / 1 participants
[nested] [flat]
* with queries
@ 2010-09-16 05:05 Greg Quinn <greg.quinn@anu.edu.au>
0 siblings, 0 replies; 2+ messages in thread
From: Greg Quinn @ 2010-09-16 05:05 UTC (permalink / raw)
To: pgsql-sql
Hullo.
I've been a Postgresql user for many years, so forgive me if I'm doing
something really stupid.
I cannot get 'with' queries to work at all. The test query that I've
entered below (as an example) is direct from the section '7.8 WITH
Queries' of the manual, so I'd expect that to work wouldn't I?
test=# WITH RECURSIVE t(n) AS (VALUES (1) UNION ALL SELECT n+1 FROM t
WHERE n < 100) SELECT sum(n) FROM t;
ERROR: syntax error at or near "WITH RECURSIVE"
LINE 1: WITH RECURSIVE t(n) AS (VALUES (1) UNION ALL SELECT n+1 FROM...
^
test=#
Tried this with 8.4 and 9.0rc1, same result. Any help (even to tell me
that I'm an idiot!) would be much appreciated. In the meantime my query
will revert to Plan A, but it would be so much neater using a 'with'.
--
Greg Quinn
Australian Phenomics Facility
greg.quinn@anu.edu.au
(02) 61259407
^ permalink raw reply [nested|flat] 2+ messages in thread
* with queries
@ 2010-09-16 05:45 Greg Quinn <greg.quinn@anu.edu.au>
0 siblings, 0 replies; 2+ messages in thread
From: Greg Quinn @ 2010-09-16 05:45 UTC (permalink / raw)
To: pgsql-sql
Forget my previous post. I am stupid. It doesn't work with 8.3.7, sorry
to trouble you.
--
Greg Quinn
Australian Phenomics Facility
greg.quinn@anu.edu.au
(02) 61259407
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-09-16 05:45 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-09-16 05:05 with queries Greg Quinn <greg.quinn@anu.edu.au>
2010-09-16 05:45 with queries Greg Quinn <greg.quinn@anu.edu.au>
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