Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
PostgreSQL version 9.1
9
votes
Maximum number of databases for single instance of PostgreSQL 9
I haven't tried it myself, but there are others around who have.
Here you can see that even 10,000 databases run without problem on a single instance. You can even find some pratical aspects on Serve …
1
vote
How to read all metadata without select permissions to actual data?
The possible solution depends on exactly which objects you are interested in.
Tables
The way I see is half suggested by the documentation:
Only those tables and views are shown that the current …
6
votes
Accepted
PostgreSQL kill - Sighup pid
Probably this will help:
The Linux operating system normally terminates, or kills, a task by
sending it a SIGHUP command. This stands for "Signal Hangup" and
terminates a process on the syste …
6
votes
Accepted
Alter postgresql table with huge data
One idea, without knowing the error you get, is that the operation times out. This sometimes happens when the locks to be taken conflict with other operations or there are too many indexes and constr …
8
votes
How to refer to individual columns of a record returned by a function?
The problem, I guess, hits everyone starting with PostgreSQL. Fortunately, the solution is rather easy: simply call
SELECT * FROM circular_ref();
instead of
SELECT circular_ref();
This way it …
2
votes
Trigger for removing group with no users left in
If you don't specify FOR EACH ROW in your CREATE TRIGGER statement, it will default to FOR EACH STATEMENT. In this case, the OLD and NEW records will never be assigned - in the end, which row should …
4
votes
Accepted
PostgreSQL, How to keep only one schema?
The documentation of GRANT says the following:
CREATE
For databases, allows new schemas to be created within the database.
For schemas, allows new objects to be created within the schema. To ren …
4
votes
Change built-in default privileges in PostgreSQL?
The CONNECT privilege for PUBLIC looks somewhat special:
\l
template1 | postgres | UTF8 | Hungarian, Hungary | Hungarian, Hungary | postgres=CTc/postgres
That is, user test (which is the memb …
3
votes
Parsing the value and copying it to another column in postgresql
If your data is consistent, so that after a number it always contains a space and then something else, then the following expression will get you the number part:
split_part(original_size, ' ', 1)
…
4
votes
Accepted
copy command in postgresql to append data
I think you cannot (easily) do that (at least on your PostgreSQL version, see Daniel's answer). What you definitely can, however, is changing your approach, and do a UNION ALL from all those tables i …
234
votes
Accepted
Granting access to all tables for a user
First, you have to be able to connect to the database in order to run queries. This can be achieved by
REVOKE CONNECT ON DATABASE your_database FROM PUBLIC;
GRANT CONNECT
ON DATABASE database_name …
7
votes
Accepted
Why does Postgres ORDER BY seem to halfway ignore leading underscores?
As you haven't defined a different collation for your column in question, it uses the database-wide one, which is en_US.UTF8 - just like on my test box. I observe the exact same behaviour, take it as …
6
votes
Issue with composite type in an UPSERT function
While klin is technically right in his answer about how to fix your current function, let me question your whole approach. What you try to achieve is called 'UPSERT' and with PostgreSQL 9.1 (which of …
4
votes
Was using `set datcollate='C'` a mistake?
The datcollate column of pg_database stores
LC_COLLATE for this database
An other page of the documentation about collations says:
The collation feature allows specifying the sort order and …
13
votes
Configuring PostgreSQL for read performance
So, from the plans I see one thing: you index is either bloated (then alongside with the underlying table) or simply isn't really good for this sort of query (I tried to address this in my latest comm …