David Johnston wrote
> Basic idea: use ORDER BY in the window to auto-define a range-preceding
> frame. Create an array of all dates (tags in the example) that match with
> positive amounts. Negative amounts get their matching tag added to the
> array as NULL. The provided function looks into th
gmb wrote
> item_code | _date| qty | max
> -
> ABC | 2013-04-05 | 10.00| 2013-04-05
> ABC | 2013-04-06 | 10.00| 2013-04-06
> ABC | 2013-04-06 | -2.00| 2013-04-06
Do keep in mind that querying across databases generally garners really poor
performance, and can bring
your application to its knees with astonishing speed.
From: pgsql-admin-ow...@postgresql.org [pgsql-admin-ow...@postgresql.org] on
behalf of Albe Laur
Bhanu Murthy wrote:
> Using Oracle Heterogeneous Services (Oracle HS) I have configured/created a
> DB link from Postgres 9.3
> database into Oracle 11gR3 database (with postgres DB user credentials).
>
> SQL> create public database link pg_link connect to "postgres" identified by
> "blahblah"
In PostgreSQL, you always connect to a 'database', then query tables. So if
you are connecting to the 'wrong' database, you will get the error you
mentioned. You can troubleshoot this in many ways -
one way would be to enable logging on PostgreSQL side and check the log and
see which database you a