From: | Hans-Jürgen Schönig <postgres(at)cybertec(dot)at> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: is it a known issue or just a bug? |
Date: | 2004-10-04 18:34:40 |
Message-ID: | 416197C0.50303@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Josh Berkus wrote:
> Tom,
>
>
>>I don't think there's any very clean way to fix this sort of problem in
>>general. We could make this particular example work if
>
>
> Frankly, I don't think there *is* any safe way to use volatile functions in
> subqueries -- I certainly avoid it, except now() and random() which as
> discussed are special cases. Perhaps a WARNING is in order?
>
Personally I like Josh's idea. A warning would be a nice thing.
I have just looked at Oracle and SQL Server to find out what those
systems are doing ...
Oracle has a very interesting concept *g*:
ORA-02287 sequence number not allowed here:
The usage of a sequence is limited and it can be used only in few areas
of PL/SQL and SQL coding.
The following are the cases where you can't use a sequence:
For a SELECT Statement:
1. In a WHERE clause
2. In a GROUP BY or ORDER BY clause
3. In a DISTINCT clause
4. Along with a UNION or INTERSECT or MINUS
5. In a sub-query
--------------------------
SQL Server does not support sequences the way we know it so it is hard
to compare.
I did not have time to test DB2 yet.
Thanks a lot,
Hans
--
Cybertec Geschwinde u Schoenig
Schoengrabern 134, A-2020 Hollabrunn, Austria
Tel: +43/720/10 1234567 or +43/660/816 40 77
www.cybertec.at, www.postgresql.at, kernel.cybertec.at
From | Date | Subject | |
---|---|---|---|
Next Message | Reini Urban | 2004-10-04 18:40:55 | Re: open item: tablespace handing in pg_dump/pg_restore |
Previous Message | Marc G. Fournier | 2004-10-04 18:26:10 | Re: [HACKERS] Contrib/earthdistance missing from cvsweb. |