Reputation
8,511
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
19 67
Newest
 Yearling
Impact
~522k people reached

Sep
17
answered PGPool Frequent Queries
Sep
16
awarded  Revival
Sep
16
comment PostgreSQL: DBLink weird permission/connection error
The overall point (and the point of my answer) is that you need a procedural approach to make sure your connection is started and stopped properly. Otherwise, you run into the fact that the planner will quite happily simplify your set operations for you and the side effects of those (that the planner is unaware of) will get omitted.
Sep
16
answered PostgreSQL transaction locked database table: “idle in transaction”
Sep
16
comment Measuring SQL execution time in PostgreSQL?
hmmmm I misread "in" for "on." Yes, pg_stat_statements is an option, provided you don't need to be able to report on which tables were hit.
Sep
16
answered How I can copy from local file to remote DB in PostgreSQL?
Sep
16
answered Measuring SQL execution time in PostgreSQL?
Sep
16
comment PostgreSQL: DBLink weird permission/connection error
Maybe, maybe not. It depends on how you do things and how loosely coupled things are. If you are careful you should be able to make it work with an ability to add columns in the destination table and your view only. Yes, an FDW seems to match your use case well.
Sep
15
awarded  Revival
Sep
15
comment PostgreSQL: DBLink weird permission/connection error
Also if your issue is maintaining additional columns, it is worth noting that these are not maintained automatically with views, so you'd have to redefine your view anyway. If you want to you could RETURN SETOF RECORD and then wrap that in a view defining the output columns. It is marginally more work to maintain but not a lot.
Sep
15
comment PostgreSQL: DBLink weird permission/connection error
WITH in PostgreSQL creates a more stable result set than an inline view does, which is why I think it might work in this case. Again it's a sort of low-level implementation detail and may not at all be worth counting on.
Sep
15
answered PostgreSQL: DBLink weird permission/connection error
Sep
14
answered Disaster Recovery for PostgreSQL 9.0
Sep
13
answered pg_dump from 9.2 to 8.4
Sep
12
answered Writing with multiple psql processes to database seems to damage data
Sep
12
answered Finding by ID in postgresql very slow on big table
Sep
12
comment Text-based interface for PostgreSQL?
you can do this with psql, actually @TinyProton. See the \d commands. Use \? for a list.
Sep
12
comment How do I efficiently get “the most recent corresponding row”?
I dont think it needs to be exact, but worried about the problem being lost in the allegory. Something a little closer would be helpful. The issue is that with pricing, the price at a certain day is likely to be a default, and consequently you wouldn't use it for reporting only as a default for transaction entry, so your interesting queries are typically only a few rows at a time.
Sep
10
revised How do I efficiently get “the most recent corresponding row”?
added 1802 characters in body
Sep
10
comment How do I efficiently get “the most recent corresponding row”?
Good point. Re-reading though I spot some real practical deficiencies with the proposed data but I can't tell if it is just a contrived example. As a contrived example, I can't tell what is missing. Maybe an update to point this out would be in order too.