Re: [GENERAL] success with postgresql on beaglebone

2012-08-17 Thread Tomas Hlavaty
Hi Ondrej, You don't have to do all that stuff on beaglebone -- you need to setup toolchain and compiler for target architecture. This is usually distribution specific. (check this for your distribution: http://www.angstrom-distribution.org/toolchains/ ) thanks for the pointer, I'll look

Re: [GENERAL] How to analyze load average ?

2012-08-17 Thread Condor
On , Tomas Vondra wrote: I think load avg is high because before I change the servers my produce server was on 16 cpu, 24 gb memory and load avg on that server was 0.24. Database is the same, users that use the server is the same, nothing is changed. I dump the DB from old server and import

[GENERAL] Best practice non privilege postgres-user

2012-08-17 Thread Frank Lanitz
Hi folks, I'm looking for some kind of best practice for a non-privilege postgres user. As not all operations can be done within psql you might need access to postgres- on command line from time to time. Currently this is done via root-privvileges and »su - postgres« directly on database server -

Re: [GENERAL] Check PostgreSQL status using MS-DOS bat file?

2012-08-17 Thread Dave Page
[Please keep the mailing list CC'd] On Fri, Aug 17, 2012 at 11:52 AM, Loughrey, Hugh hugh.lough...@hoopleltd.co.uk wrote: Hi Dave, Thanks for the message below. The script you forwarded looks to be for an instance in which the DB is running of a windows box, apologies I should have

Re: [GENERAL] Check PostgreSQL status using MS-DOS bat file?

2012-08-17 Thread dinesh kumar
Hi , Dave's instructions are helpful for finding the status of the server.. However, I do have the below the script which is nothing but PgPing in windows ... I hope it helps you in the implementation .. @ECHO OFF set PSQL=C:\Program Files\PostgreSQL\9.1\bin set DBNAME=template1 set

Re: [GENERAL] Best practice non privilege postgres-user

2012-08-17 Thread Moshe Jacobson
I do not know of anything that can't be done from within psql. We use non-privileged user roles in postgres for day-to-day operations. When I need to modify the schema, I become postgres (you can do \c - postgres) and do what I need to do, then revert back to my regular user. On Fri, Aug 17, 2012

Messy data models (Re: [GENERAL] Visualize database schema)

2012-08-17 Thread Wolfgang Keller
Concerning auto-layout, most if not all tools I have used up to now make a mess for anything that is not dead simple. If a data model can not be reasonably untangled by an auto-layout algorithm (such as e.g. Graphviz) for display as a human-readable graph, wouldn't that mean that this model is

Re: [GENERAL] Best practice non privilege postgres-user

2012-08-17 Thread Albe Laurenz
Frank Lanitz wrote: I'm looking for some kind of best practice for a non-privilege postgres user. As not all operations can be done within psql you might need access to postgres- on command line from time to time. Currently this is done via root-privvileges and su - postgres directly on

[GENERAL] Replication with infrequent large updates

2012-08-17 Thread Matthew Vernon
Hi, I have a couple of queries about replication. Essentially, I have three servers reasonably remote from each other. The master server gets large (order 1-10GB) updates very infrequently (every month or so), which usually go into new schema. The two slaves need to provide read-only access to

Re: Messy data models (Re: [GENERAL] Visualize database schema)

2012-08-17 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Wolfgang Keller Sent: Friday, August 17, 2012 9:08 AM To: pgsql-general@postgresql.org Subject: Messy data models (Re: [GENERAL] Visualize database schema)

Re: Messy data models (Re: [GENERAL] Visualize database schema)

2012-08-17 Thread Sébastien Lorion
Short answer: no. Even with a good auto-layout, nothing (up to now) beats a human made one because the latter will incorporate semantic which is not available to the modeling tool; for example, positioning, spacing and routing of relations will respect some sense of aesthetic and organization that

[GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-17 Thread Adam Mackler
Hi: I notice when I save a view, I lose all the formatting and comments. As I was writing a complicated view, wanting to retain the format and comments, I thought I could just save it as a function that returns a table value. A function would evaluate to the same value as a view, but changing it

Re: [GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-17 Thread Tom Lane
Adam Mackler adammack...@gmail.com writes: I notice when I save a view, I lose all the formatting and comments. As I was writing a complicated view, wanting to retain the format and comments, I thought I could just save it as a function that returns a table value. A function would evaluate to

Re: [GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-17 Thread Merlin Moncure
On Fri, Aug 17, 2012 at 5:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Adam Mackler adammack...@gmail.com writes: I notice when I save a view, I lose all the formatting and comments. As I was writing a complicated view, wanting to retain the format and comments, I thought I could just save it as

Re: [GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-17 Thread Uwe Schroeder
Hi: I notice when I save a view, I lose all the formatting and comments. As I was writing a complicated view, wanting to retain the format and comments, I thought I could just save it as a function that returns a table value. A function would evaluate to the same value as a view, but

Re: [GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-17 Thread David Johnston
Included below: 1) Question regarding the ability to inline set-returning functions 2) A comment that not keeping the content between the CREATE VIEW ... AS and the trailing ;|EOF is losing good information to have inside the database. Correct. The reparse time per se is generally not a big

Re: [GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-17 Thread Tom Lane
David Johnston pol...@yahoo.com writes: Trying to answer the previous question this one presented itself: I just tried a couple of very simple queries and couldn't get them give me a plan that wasn't a Function Scan. Is it possible that only scalar functions can be inlined? CREATE OR

Re: [GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-17 Thread Chris Travers
On Fri, Aug 17, 2012 at 2:35 PM, Adam Mackler adammack...@gmail.com wrote: Hi: I notice when I save a view, I lose all the formatting and comments. As I was writing a complicated view, wanting to retain the format and comments, I thought I could just save it as a function that returns a

[GENERAL] Fwd: PSQL Help from your biggest fan

2012-08-17 Thread Evan Stanford
Hi Grzegorz and Pgsql-General, Can you forward this to Scott Bailey? I tried sending it to his old email, but it seems to be closed. Or could you answer my question yourself? Thank you so much, Evan Stanford -- Forwarded message -- From: Evan Stanford evanstanfo...@gmail.com

Re: [GENERAL] Fwd: PSQL Help from your biggest fan

2012-08-17 Thread Raghavendra
I tried your code in Postgres 8.2: 8.2 ?, Seems you have tested it in very Old version. CREATE OR REPLACE FUNCTION _final_mode(anyarray) RETURNS anyelement AS $BODY$ SELECT a FROM unnest($1) a GROUP BY 1 ORDER BY COUNT(1) DESC, 1 LIMIT 1; $BODY$ LANGUAGE 'sql' IMMUTABLE;