Reputation
7,753
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 18 42
Newest
 Revival
Impact
~350k people reached

Apr
17
comment How to upgrade postgresql 8.4 to 9.4
@ZQL 8.5? That was never released officially...
Apr
17
comment How to upgrade postgresql 8.4 to 9.4
To be honest, the description is very clear on the linked page. Taking a dump means you have a dump for the case something does not work. That also means that you don't lose it. Furthermore, there is a link on that page pointing to how to actually install a newer version - for example, on Ubuntu, there is a postgresql-client-9.4 package that contains psql.
Apr
17
comment Sharing PostgreSQL database on one dual-boot machine without duplication (cross-platform)
This shows you that it won't work this way. The allowed values for certain parameters in postgresql.conf for Windows and non-windows are a bit different. Plus what @a_horse_with_no_name says. You may be able to set up a VM of some sort that can be started from both OSes.
Apr
17
comment career in Oracle PL/SQL
Just an idea: look for open jobs in this field in Kuwait.
Apr
17
comment Inaccurate count when using multiple count functions in PostgreSQL
@LucasNeo no, you did not answer Craig's questions at all.
Apr
16
comment PostgreSQL: raise error if planner needs to do an sequence scan
@guettli SELECT count(1) FROM thing WHERE t_created >= now() - interval '1 year';
Apr
16
comment PostgreSQL: raise error if planner needs to do an sequence scan
I am not sure if this does not give you more work than necessary. When you carpet bomb the DB with indexes based on assumptions about their necessity, you realize later that many of these are unused. (There are obvious cases where an index will be needed, but those are usually known already at physical data modelling time.)
Apr
15
comment FDW, replication and CREATE SERVER - will it work?
I am not sure from the quesiton, but if the FDW connects to a separate cluster located on the host of the master, it could work (and possibly even make sense).
Apr
14
comment The cost of left out join versus a select
There is absolutely no problem with a LEFT [OUTER] JOIN, it's a common myth, I guess. Read a bit about the N+1 issue, too: stackoverflow.com/questions/97197/what-is-the-n1-selects-issue
Apr
14
comment Postgresql match all in full text search
That sounds like a very nice performance sink :) On the other hand, I could not figure out a good solution for you.
Apr
12
comment Are file locations stored in PostreSQL catalog?
SELECT current_setting('data_directory');
Apr
10
comment Postgresql match all in full text search
Why would you do that?
Apr
8
comment 'ERROR: text search dictionary “unaccent” does not exist' during CREATE INDEX?
I've tried to replicate your issue but the index creation worked.
Apr
4
comment How to temporarily disable foreign keys in Amazon RDS PostgreSQL?
Oh yes, this way it won't work. But how about dropping and recreating the FK constraints?
Apr
3
comment How to temporarily disable foreign keys in Amazon RDS PostgreSQL?
How do you disable FKs now? Why do you expect it to be different on RDS? Also, why not try yourself?
Apr
2
comment Slow query over 10mil rows with group by on indexed column
Well, checking the numbers, the sequential scan returns 9935732 rows, with the filter excluding the remaining 4261215. This means that 2/3 of your table matches the WHERE condition - I would not expect any index helping much on this.
Apr
1
comment Restoring plain-text pg_dump with psql and --disable-triggers
All this means that some data has been updated, right? Try to update them back, using a temp table where you copy the original data.
Mar
31
comment Best way to drop / recreate a table that has dependent views?
I'd say the easiest way to do this is what I shortly described above. You could also attempt scripting the views programmatically, using the different catalogs and system information functions, dropping and recreating the table and then running the script with the views. BTW, what do you do with the existing data?
Mar
31
comment Best way to drop / recreate a table that has dependent views?
I'd strongly suggest revising your design then. Relying on the order of columns is hardly ever a good practice. I admit that it is nicer to have consistency, but one has to keep an eye on the costs of maintaining the nicety. The only case when I really see an advantage in changing the column order is when you can win a few bytes per row with aligning the columns better - as said, in huge tables.
Mar
31
comment Best way to drop / recreate a table that has dependent views?
There is no such possibility. What you could possibly do is to create the extended table anew in a separate schema, then all the dependent views, and finally swap in the new stuff and out the old. By the way, what's your reason for adding a new column in the middle of the table? There are cases when the column order is important, typically when the row number approaches the billion(s).