Reputation
8,181
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
17 64
Newest
 Enlightened
Impact
~436k people reached

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.
Sep
10
answered How do I efficiently get “the most recent corresponding row”?
Sep
9
answered PostgreSQL Hot Standby
Sep
8
comment Which schema is better for a shopping project?
Also regarding the classic way, I think your problem is that you end up with a lot of the problems of EAV modelling. This can be used, but it means that queries like "show me all hard drives with a capacity of 500GB, using an SATA interface, and with a speed of 7200 RPM" becomes an amazingly complex query which does not scale.
Sep
8
comment Which schema is better for a shopping project?
@burakemre, what you lose with JSON is an ability to do real type enforcement on a db schema level, so you can't be sure that all the required fields are filled in on the db level.
Sep
7
answered Which schema is better for a shopping project?