with queries
От | Greg Quinn |
---|---|
Тема | with queries |
Дата | |
Msg-id | 4C91A58C.7050406@anu.edu.au обсуждение исходный текст |
Список | 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
В списке pgsql-sql по дате отправления: