Re: [GENERAL] Visualize database schema

2012-08-14 Thread Robert Gravsjö
> Can anyone advice about a tool to visualize a database schema? Ideally, I > would like something that takes the SQL definition of a schema or database > (essentially the output of pg_dump) and produces a graphical representation > of the tables, constraints and indexes which can be moved aroun

Re: [GENERAL] Draw Model from existing DB

2012-07-06 Thread Robert Gravsjö
> I have an existing PostgreSQL DB and I would like to draw a model of the DB > structure. Is there some software (Freeware) around that can read the > existing structure of my DB and automatically draw e.g. an ER-model of that? > The software that I have found so far (e.g. Open System Architect) s

Re: [GENERAL] Question: How do you manage version control?

2012-06-03 Thread Robert Gravsjö
> -Ursprungligt meddelande- > Från: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] För Ralf Schuchardt > Skickat: den 1 juni 2012 18:24 > Till: pgsql-general > Ämne: Re: [GENERAL] Question: How do you manage version control? I was using a very simplisti

Re: [GENERAL] recommended schema diff tools?

2012-04-12 Thread Robert Gravsjö
(sorry for top posting but I'm using a less than sane email client) I came across SQL Power Architect not long ago and it might be something you could use. http://code.google.com/p/power-architect/ I haven't had much time to look at it though. Regards, roppert Från: pgsql-general-ow...@pos

Re: [GENERAL] Possible Bug

2011-02-09 Thread Robert Gravsjö
On 2011-02-09 10.51, Kaloyan Iliev Iliev wrote: Hi, I think I found something strange in PostgreSQL behavior. Here is an example: testdb=# CREATE TABLE test1 (test2 text, test3 text); CREATE TABLE testdb=# SELECT A.name FROM test1 A; name -- (0 rows) testdb=# INSERT INTO test1 (test2,tes

Re: [GENERAL] Privileges of Users

2011-01-21 Thread Robert Gravsjö
On 2011-01-21 16.16, Andy Colson wrote: On 1/20/2011 11:56 PM, Adarsh Sharma wrote: Dear all, I want to know ACl of different users on different tables and databases in Postgresql. Is there any command as we do in mysql as : select * from mysql.user\G; I am researching but cannot able to fi

Re: [GENERAL] My DataBase can't accept conntecion

2011-01-12 Thread Robert Gravsjö
On 2011-01-12 13.13, zab08 wrote: we have e test db server, we use jdbc to contect. but after a whie, The test db server can not accept connect. useps aux | grep postgrescommand : postgres 16904 0.0 0.0 46036 3948 ?S17:03 0:00 /usr/local/pgsql/bin/postgres -D /usr/local/pgs

Re: [GENERAL] How to restore from backup to 8.4.3 server using 9.0 dump/restore

2010-12-16 Thread Robert Gravsjö
On 2010-12-16 11.21, Jayadevan M wrote: Hello, I don't know for sure, but I don't see why it should fail - it's only reading it, not writing data to it or making any changes. Probably it will fail... http://www.postgresql.org/docs/9.0/static/sql-createdatabase.html Although it is possible to

Re: [GENERAL] How to restore from backup to 8.4.3 server using 9.0 dump/restore

2010-12-16 Thread Robert Gravsjö
On 2010-12-16 11.12, Andrus Moor wrote: Robert, I'm probably misunderstanding but "CREATE DATABASE foo TEMPLATE bar" will clone bar as foo including data. Of course this only works within the same cluster. Than you. You are genious I haven't never tought about this. Will this work if datab

Re: [GENERAL] How to restore from backup to 8.4.3 server using 9.0 dump/restore

2010-12-16 Thread Robert Gravsjö
On 2010-12-16 09.16, Andrus Moor wrote: Another requirement is to clone existing database in server with data. I posted question about it and it seems that PostgreSql does not have any capability to do this in server side in plpgsql fast. I'm probably misunderstanding but "CREATE DATABASE f

Re: RES: [GENERAL] Using regexp_replace to remove small words

2010-12-13 Thread Robert Gravsjö
On 2010-12-13 13.24, Henrique de Lima Trindade wrote: Hi Peter, Your example works perfectly. But, I need Your help with on another situation. We're trying to create a plpgsql function with the expression. But, I'm getting a syntax error: - create or replace function sp_remov

Re: [GENERAL] Asynchronous query execution

2010-12-08 Thread Robert Gravsjö
On 2010-12-08 14.35, c k wrote: Hello, I would like to know how can we execute the queries asynchronously? If we use and execute plpgsql functions they just completes the execution or throws an error on error. In between next sql statement waits for the previous one to complete the execution. B

Re: [GENERAL] Looking for auto starting procedures

2010-12-02 Thread Robert Gravsjö
On 2010-12-01 16.16, ma...@manfbraun.de wrote: Hello ! I am coming from Sql Server right now and have to learn about the infrastructure. What I missed first, is, to execute procedures regularly/repeatedly on a given time. I want to prevent my to write a lot external programs und use cron :-(

Re: [GENERAL] How to find correct locale name for CREATE DATABASE

2010-12-02 Thread Robert Gravsjö
On 2010-12-01 09.26, Andrus wrote: Thom, You can list available locales on your system with: locale -a Thank you. How to resolve this issue if only 5432 port is open in server ? Maybe asking the sysadmin of that host to return the result of "locale -a"? Btw, are you sure et_EE.UTF-8 is

Re: [GENERAL] techniques for bulk load of spatial data

2010-12-01 Thread Robert Gravsjö
On 2010-11-30 14.29, Mario Corchero wrote: Hi, I'm a student of Computer Science, I know diffrents techniques of bulk load, but I need to know how specifically postgreSQL make a bulk load of spatial data, could anyone Suggestions when loading large amount of data: http://www.postgresql.org/do

Re: [GENERAL] alter table add column - specify where the column will go?

2010-11-24 Thread Robert Gravsjö
On 2010-11-24 10.43, Thomas Kellerer wrote: Grzegorz Jaśkiewicz, 24.11.2010 10:37: just never use SELECT *, but always call columns by names. You'll avoid having to depend on the order of columns, which is never guaranteed, even if the table on disk is one order, the return columns could be in

Re: [GENERAL] Debug advice when postgres connection maxing out

2010-11-24 Thread Robert Gravsjö
0 45764 45760 0 0:00.00 ttys0000:00.00 grep postgres 0 45588 45585 0 0:00.01 ttys0010:00.01 su - postgres On Tue, 23 Nov 2010 04:00:07 -0800 Robert Gravsjö<rob...@blogg.se> wrote On 2010-11-22 20.41, anypossibility wrote: > Server: OS X 10.

Re: [GENERAL] Debug advice when postgres connection maxing out

2010-11-23 Thread Robert Gravsjö
On 2010-11-22 20.41, anypossibility wrote: Server: OS X 10.5 PostgreSQL version: 8.3 We experience this connection maxing out once in the full moon. The request from client reaches to the server but client never receive response back. The queries are very simple update on one record or selec

Re: [GENERAL] The first dedicated PostgreSQL forum

2010-11-18 Thread Robert Gravsjö
On 2010-11-17 15.09, Tony Caduto wrote: On 11/15/2010 5:53 PM, Lee Hachadoorian wrote: If anyone's interested, I've started accessing the postgres list through gmane.org (along with several other mailing lists I subscribe to). It's gives you the choice of reading the list as a threaded archive

Re: [GENERAL] upgrade from postgres 8.x to 9.x problem

2010-11-18 Thread Robert Gravsjö
On 2010-11-18 03.57, Ray wrote: On Nov 17, 8:42 pm, Ray wrote: -- snip --- figured out. the begin is keyword and need to double quoted. This is one strong reason why you should avoid using keywords as object names. Better to fix that early in the design since names has a tendency to s

Re: [GENERAL] Linux

2010-11-04 Thread Robert Gravsjö
On 2010-11-04 16.00, Michael Gould wrote: I know that this is probably a "religion" issue but we are looking to move Postgres to a Linux server. We currently have a Windows 2008 R2 active directory and all of the other servers are virtualized via VMWare ESXi. One of the reasons is that we wan

Re: [GENERAL] Replication Poll

2010-10-29 Thread Robert Gravsjö
On 2010-10-28 22.50, Joshua D. Drake wrote: Hey, Based on the discussion here: http://www.commandprompt.com/blogs/joshua_drake/2010/10/users_versus_customers_-_you_dont_need_no_stinking_replication/ http://thebuild.com/blog/2010/10/28/small-postgresql-installations-and-9-0-replication/ http:/

Re: [GENERAL] Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)

2010-10-04 Thread Robert Gravsjö
Alexander Farber skrev 2010-10-04 11.20: Hello Postgres users, I have a Linux website with phpBB serving a small Facebook game: # uname -a Linux X 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:50:31 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/redhat-release CentOS release 5.5 (Final) #

Re: [GENERAL] Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)

2010-10-04 Thread Robert Gravsjö
Alexander Farber skrev 2010-10-04 11.48: I wish I could see those hanging queries, what SQL do they try to execute: To see the query you need to enable stats_command_string in your postgresql.conf. See: http://www.postgresql.org/docs/8.1/interactive/runtime-config-statistics.html You migh

Re: [GENERAL] Analyze tool?

2010-10-01 Thread Robert Gravsjö
Rob Sargent skrev 2010-10-01 15.43: Then to get all statements would one simply set log_min_duration to some arbitrarily small value? From default postgresql.conf comments: -1 is disabled, 0 logs all statements and their durations, > 0 logs only statements running at least this number of mi

Re: [GENERAL] Cognitive dissonance

2010-06-11 Thread Robert Gravsjö
Leif Biberg Kristensen skrev 2010-06-10 17.33: On Thursday 10. June 2010 17.24.00 Tom Lane wrote: Alvaro Herrera writes: Excerpts from Peter Eisentraut's message of jue jun 10 02:50:14 -0400 2010: As I said back then, doing this is straightforward, but we kind of need more than one user wh

Re: [GENERAL] Pre-calculate hash join

2010-01-12 Thread Robert Gravsjö
Dimitri Fontaine skrev 2010-01-12 12.01: war...@warrenandrachel.com writes: When joining two large tables [common in warehousing], a hash join is commonly selected. Calculating hash values for the merge phase is CPU intensive. Is there any way to pre-calculate value hashes to save that time?

Re: [GENERAL] Curious index selection when using a date range

2010-01-03 Thread Robert Gravsjö
Scott Marlowe skrev 2010-01-03 22.03: On Sun, Jan 3, 2010 at 1:10 PM, Robert Gravsjö wrote: I encountered a curious thing today. Simple select queries against a fairly large, ~60M rows, and active, both in reading and writing, suddenly were aweful slow, from milliseconds into 10th of seconds

[GENERAL] Curious index selection when using a date range

2010-01-03 Thread Robert Gravsjö
I encountered a curious thing today. Simple select queries against a fairly large, ~60M rows, and active, both in reading and writing, suddenly were aweful slow, from milliseconds into 10th of seconds. Looking a bit closer revealed that on a date condition having a between 2010-01-01 00:00:00

[GENERAL] Table partitioning

2009-05-20 Thread Robert Gravsjö
While reading through the docs on Partitioning, http://www.postgresql.org/docs/current/static/ddl-partitioning.html, I got to wonder about the example given. The text in 5.9.2 states, item 1 in the first section, that the master table will contain no data. This is later confirmed by the example

Re: [GENERAL] how to select temp table

2009-05-06 Thread Robert Gravsjö
On 2009-05-06 14.34, liuzg4 liuzg4 wrote: ver 8.4 i create two table with same name named 'testtable' one is temp table i select * from testtable then this table is a public or a temp ??? Temp. To access public use "select * from public.testtable". "Temporary tables exist in a special

Re: [GENERAL] What's size of your PostgreSQL Database?

2008-08-20 Thread Robert Gravsjö
Mark Roberts wrote: 1. 2.5-3TB, several others that are of fractional sisize. ... 5. They do pretty well, actually. Our aggregate fact tables regularly join to metadata tables and we have an average query return time of 10-30s. We do make some usage of denormalized mviews for chained/hier

Re: [GENERAL] Is this good spec for a PostgreSQL server?

2007-09-19 Thread Robert Gravsjö
Bjørn T Johansen wrote: It's a Dell server with the following spec: PE2950 Quad-Core Xeon E5335 2.0GHz, dual 4GB 667MHz memory 3 x 73GB SAS 15000 rpm disk PERC 5/I Integrated controller card (8 ports, 256MB cache, battery backup) x 6 backplane Is this ok to run PostgreSQL 8.2.x and Tomcat o

Re: [GENERAL] Partitioning

2007-08-20 Thread Robert Gravsjö
Julio Cesar Sánchez González wrote: Hi guys, It's natural what master table in the partitioning table contain data (http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html) ? or to be empty. Hi, the master table should be empty when doing partitioning. Regards, roppert Thanks

Re: [GENERAL] Table description

2007-08-20 Thread Robert Gravsjö
Livia Santos wrote: Hi. Is there any command that describe a table, such as desc table_name as in Oracle? Not sure how desc table_name works in Oracle, but from psql you can use: \dt table_name Issue \? in psql for more information. Regards, roppert Thanks in advance. -- Lívia Silva San