0
votes
0answers
9 views

Consolidating large table [migrated]

I need some help with a complex query. Table def: Table "public.agent_log" Column | Type | Modifiers ...
1
vote
0answers
19 views

Efficient storage of messages [migrated]

I am developing a service that relies on users being able to recieve messages that they themselves choose. These messages need to be stored somewhere before they are send for processing. Right now ...
0
votes
1answer
345 views

How do I grant select, insert privileges in Postgres on Cygwin?

How do I grant permissions in Postgres? I followed the documentation, however it is not working. $ psql tmadev psql (9.2.4) Type "help" for help. tmadev=# grant all privileges on database tmadev to ...
1
vote
2answers
1k views

Postgres INSERT ERROR: permission denied for schema public

In Postgres I created the following table inside a db called testing: CREATE TABLE category_google_taxonomy ( category_id integer references category ON UPDATE CASCADE ON DELETE CASCADE, ...
0
votes
2answers
495 views

What is a typical Compression Ratio for an SQL Database backup file? [closed]

One of my clients want us to give a safe estimate of how much disk space does a compressed SQL backup file take. They need to size their server hard disks accordingly. We can rouhgly estimate the ...
1
vote
0answers
63 views

Restricted LDAP mimic server backed on SQL

I may not be an expert on the subject, but it seems to me that 99% of any LDAP server installation is used only to provide user authentication credentials and nothing more. Given this restricted ...
1
vote
0answers
62 views

No remote access to PostgreSQL db

i'm stuck in connecting to a PostresSQL database from remote host. The server is accepting incoming connections on port 5432 and i've configured pg_hba.conf like this: local all all ...
1
vote
3answers
324 views

Slow PostgreSQL response over VPN

I'm having a problem with a medical records program that uses a Postgre SQL as a backend. Several offices are connecting to a corporate site via Cisco VPNs. There is an ASA5055 at corporate and most ...
0
votes
2answers
1k views

How to dump a part of a table from PostgreSQL?

I have a PostgreSQL database with a multi-Gb table (which contains a log of certain events). I need to pass the latest events to an analyst - let's say he only needs events from the last month. How ...
-1
votes
1answer
144 views

Big SQL database platform that performs well [closed]

I would like to know your opinion on which DBMS (probably SQL) can perform fairly well and not stress the server too much from the CPU / RAM point of view. I'm used to MySQL but I found (maybe it was ...
0
votes
1answer
67 views

Is it possible to set a default column value in PostgreSQL using an external non-SQL function?

For example, say I wanted to have one column take the row id and run it through a Python script which returns some information related to that number (random example). Would I need to manually ...
-6
votes
2answers
95 views

Learning PostgreSQL after using MySQL [closed]

I'm looking for a simple resource for getting the hang of Postgres after using MySQL for years. So far I've figured out \l, \d, and \c, but I'm having trouble listing the tables in my MediaWiki ...
0
votes
2answers
131 views

Is it possible to restore table without backup in postgres

I have made some unfortunate UPDATE on a Postgresql table. Is it possible to reverse that change without any backup / rollback save etc?
0
votes
2answers
2k views

PostgreSQL won't start anymore

Today, my PostgreSQL doesn't start anymore on my windows machine... I've tried to start the service in windows services and got the following error: Windows could not start the PostgreSQL Database ...
0
votes
1answer
48 views

SQL installation

I just installed postgresql9.0.3 and when I went to the bin to run psql it asked for a password....I am typing the password which I gave at the time of installation but nothing is being written on the ...
2
votes
1answer
150 views

How to count unique values?

I am trying get the number of unique ip_addresses (in this case '3'). The table looks like this: Structure: CREATE TABLE bandits ( key text NOT NULL, ip_address inet, offence text, count ...
14
votes
1answer
23k views

Postgresql: what does GRANT ALL PRIVILEGES ON DATABASE do?

I'm trying to grant all privileges on all tables of a given database to a new postgres user (not the owner). It seems that GRANT ALL PRIVILEGES ON DATABASE my_db TO new_user; does not do that. After ...
0
votes
2answers
274 views

What package do install to get access to “psql” client on windows

What package do install to get access to "psql" client on windows xp? I don't want to install a server, only the command-line client, and maybe pg_dump and co. I am connecting to Postgresql 8.4 ...
2
votes
2answers
2k views

PostgreSQL deleteing old records from log tables

I have a PostgreSQL database which stores my RADIUS connection information. What I want to do is only store a month worth of logs. How would I craft an SQL statement that I can run from cron that ...
8
votes
7answers
2k views

Is MySQL better than PostgreSQL in something?

I know the question sounds provocative, but it really isn't. I'm lately finding MySQL limiting in a lot of areas and liking PostgreSQL more and more. It scales a lot better and it respects the SQL ...
2
votes
1answer
776 views

How to Explain a query in Postgres 8.3 that has bind variables

I need to explain an application generated SQL statement in Postgresql 8.3. I captured the sql statement in the log but it has a lot of bind variables. Is their any way that I can explain this sql ...
16
votes
6answers
23k views

GRANT SELECT to all tables in postgresql

Is there a one-liner that grants the SELECT permissions to a new user postgresql? Something that would implement the following pseudo-code: GRANT SELECT ON TABLE * TO my_new_user;
7
votes
2answers
6k views

How to change in postgresql password of the user using SQL

How to change in postgresql password of the user using SQL. I have user (alex) and his password (e.g. pass) i need to change using sql statement his password to NULL...
2
votes
3answers
4k views

What do I do when pg_cancel_backend doesn't work?

If I have a long-running Postgres query, and regular "kill [pid]" doesn't work, and pg_cancel_backend doesn't work, what should I do?
2
votes
2answers
3k views

How do I copy a table from one SQL database to another?

I have a database (it's Postgres, if that matters) and I would like to take two of its tables, export them, and then import them into another database. How do I do that? Edited to add Google bait: ...
7
votes
2answers
1k views

Postgres: Non zero exit code when executing a sql file?

I am writing a shell script which makes calls to psql using 2 forms... one is by command (-c), the other is by file (-f). e.g. psql -c "create table foo (bar integer)" psql -f foobar.sql One ...
7
votes
3answers
11k views

Postgres: How can I see all SQL statements being executed by the database server?

I'm in the process of reviewing every SQL statement that an application makes against the database, for performance reasons. Is there an easy way to log all statements that are executed by the ...