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

18h
comment Combine multiple query into 1 query
To me it sounds like GROUP BY is your friend.
1d
comment How to upgrade postgresql 8.4 to 9.4
If you take a dump of them, then no. You should anyway have regular backups that you test for recoverability, so this should be no issue at all. Also, if you choose to use pg_upgrade, it will keep your DBs - but taking a backup is a must in this case, too.
1d
comment How to upgrade postgresql 8.4 to 9.4
@ZQL 8.5? That was never released officially...
1d
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.
1d
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.
1d
comment career in Oracle PL/SQL
Just an idea: look for open jobs in this field in Kuwait.
1d
comment Inaccurate count when using multiple count functions in PostgreSQL
@LucasNeo no, you did not answer Craig's questions at all.
2d
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';
2d
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?