[GENERAL] A new log analysis tool for Postgres is available

2010-02-19 Thread Baron Schwartz
I've just committed a log-parsing front-end for mk-query-digest, a tool included in Maatkit, so it can parse and analyze Postgres log files. I encourage people to try this functionality and give feedback by replying here, adding to http://code.google.com/p/maatkit/issues/detail?id=535, or jumping

Re: [GENERAL] How can I get the English version?

2010-02-19 Thread Nils Gösche
Thomas wrote: > File -> Options -> User Language -> English > > works for me *groan* I was looking at that dialog, but still missed that. Thanks again! Regards, -- Nils Gösche "Don't ask for whom the tolls." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] How can I get the English version?

2010-02-19 Thread Thomas Kellerer
Nils Gösche wrote on 20.02.2010 00:20: set LC_MESSAGES=English Yes, that works very well for psql, thanks! However, pgAdmin is still in German. Any other trick? File -> Options -> User Language -> English works for me Thomas -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] How can I get the English version?

2010-02-19 Thread Nils Gösche
Thomas wrote: > set LC_MESSAGES=English Yes, that works very well for psql, thanks! However, pgAdmin is still in German. Not even setting LC_ALL to en_US seems to help. Any other trick? Regards, -- Nils Gösche "Don't ask for whom the tolls." -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] How can I get the English version?

2010-02-19 Thread Thomas Kellerer
Nils Gösche wrote on 19.02.2010 23:29: Hi! I am running PostgreSQL on a German Windows machine. Client programs like psql and pgAdmin are printing German translation strings everywhere, even though I told the installer to use English/United States locale. How can I disable all translations and s

[GENERAL] How can I get the English version?

2010-02-19 Thread Nils Gösche
Hi! I am running PostgreSQL on a German Windows machine. Client programs like psql and pgAdmin are printing German translation strings everywhere, even though I told the installer to use English/United States locale. How can I disable all translations and simply use the English version of all prog

[GENERAL] Sr. Linux Systems Architect - CentOS, PostgresSQL/pgPool-II, Apache Server, Python, Bacula

2010-02-19 Thread WordStream
Job Responsibilities The Sr. Linux Systems Architect will be responsible for production and supporting infrastructure behind the WordStream Suite of products. If you enjoy a startup experience which is both challenging and very rewarding, then this is the position for you! As a part of a small t

[GENERAL] When making ODBC remote connection, which executable is called?

2010-02-19 Thread Nim Li
Hello, After I install PostgreSQL to Windows Server 2008, I cannot connect to it through another computer. I believe the Window's firewall is blocking the traffic. So I go to the firewall setup to create a new "Inbound" rule. When creating a "Custom-type" rule to specify the details, I hav

Re: [GENERAL] Possible causes for database corruption and solutions

2010-02-19 Thread Bruce Momjian
Is changing the OS/X wal_sync_method default something we should consider? --- Greg Smith wrote: > Michael Clark wrote: > > The solution to the problem seemed to be to change the value for the > > wal_sync_method setting to

Re: [GENERAL] Doubts about oid

2010-02-19 Thread Vick Khera
On Thu, Feb 18, 2010 at 11:08 PM, Scott Marlowe wrote: > Oracle and postgres are definitely different here.  There's really no > equivalent to rowid in pgsql.  oid has no special optimizations.  An > indexed PK of a serial is about as good as it gets, possibly > clustered. access by CTID is the f

Re: [GENERAL] GROUP BY column alias?

2010-02-19 Thread Tom Lane
David Fetter writes: > On Fri, Feb 19, 2010 at 12:07:42AM -0500, Tom Lane wrote: >> SQL:1999 and later use a slightly different definition which is not >> entirely upward compatible with SQL-92. In most cases, however, >> PostgreSQL will interpret an ORDER BY or GROUP BY expression the >> same way

Re: [GENERAL] GROUP BY column alias?

2010-02-19 Thread David Fetter
On Fri, Feb 19, 2010 at 12:07:42AM -0500, Tom Lane wrote: > Lew writes: > > Eric B. Ridge wrote: > >> That explains it. Thanks. Breaks the rule of least surprise, > >> but it is SQL. > > SQL:1999 and later use a slightly different definition which is not > entirely upward compatible with SQL-92

Re: [GENERAL] Compiling .pgc programs gives error

2010-02-19 Thread Tom Lane
"mike stanton" writes: > I have a problem compiling pgc programs with ecpg. > I always get the following error: > /usr/local/pgsql/lib/libpgtypes.a(timestamp.o): In function `timestamp2tm': > timestamp.c:(.text+0x2fc): undefined reference to `rint' Seems like you need to add "-lm" to your link c

[GENERAL] Compiling .pgc programs gives error

2010-02-19 Thread mike stanton
I have a problem compiling pgc programs with ecpg. I always get the following error: /usr/local/pgsql/lib/libpgtypes.a(timestamp.o): In function `timestamp2tm': timestamp.c:(.text+0x2fc): undefined reference to `rint' Version: PostgreSQL 8.3.6 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.2.4

Re: [GENERAL] PostgreSQL fails to start

2010-02-19 Thread Raymond O'Donnell
On 19/02/2010 13:10, Heddon's Gate Hotel wrote: > I've installed postgreSQL 8.4 on a Windows XP machine, and I can't get > it to start. Choosing Start Server from the menu produces a DOS box > that remains blank for about 3 minutes, then comes up with this error > message: > > The postgresql-8.4

[GENERAL] PostgreSQL fails to start

2010-02-19 Thread Heddon's Gate Hotel
I've installed postgreSQL 8.4 on a Windows XP machine, and I can't get it to start. Choosing Start Server from the menu produces a DOS box that remains blank for about 3 minutes, then comes up with this error message: The postgresql-8.4 service is starting. The

Re: [GENERAL] Setting a table to be ignored by autovacuum

2010-02-19 Thread Chris Barnes
It is... Welcome to psql 8.3.3, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit postgres=# SELECT version();

Re: [GENERAL] Doubts about oid

2010-02-19 Thread Alvaro Herrera
Jayadevan M escribió: > I am an Oracle guy who is learning PostgreSQL. oid sounded a lot like > rowid in Oracle. In Oracle, access by rowid is expected to be the fastest > way of accessing a record, faster than even an index access followed by > table access using the primary key. That was why

Re: [GENERAL] How to get the users name from users group?

2010-02-19 Thread Jignesh Shah
Exactly the same! Thanks a ton. On Fri, Feb 19, 2010 at 3:58 PM, Magnus Hagander wrote: > 2010/2/19 Jignesh Shah : > > Hello All, > > > > I have created role "database-users" and inserted some of users inside > it. Could you tell me which query to use for listing out those users name? I > went t

Re: [GENERAL] Getting number of affected row after performing update

2010-02-19 Thread Alban Hertroys
On 19 Feb 2010, at 6:42, Yan Cheng Cheok wrote: >-- HOW?!?! >--ERROR: column "rowcount" does not exist >--LINE 1: SELECT @@ROWCOUNT=0 >IF @@ROWCOUNT=0 THEN > EXECUTE 'INSERT INTO statistic(fk_lot_id, "value", measurement_type, > statistic_type) VALUES ($1, $2, $3, $4)' >

Re: [GENERAL] Setting a table to be ignored by autovacuum

2010-02-19 Thread Alban Hertroys
On 18 Feb 2010, at 18:47, Chris Barnes wrote: > Right you are, I'm due to upgrade end of month on this system. > Here I was thinking 8.4. Sorry for the spam. > > Chris > > > [postg...@pgprd01:~/pgcheck]$ psql > Welcome to psql 8.3.3, the PostgreSQL interactive terminal. > Type: \copyright f

Re: [GENERAL] PERFORM not working properly, please help..

2010-02-19 Thread wilczarz1
I suppose some workaround would be to introduce temporary cursor: CREATE OR REPLACE FUNCTION A3() RETURNS VOID AS $BODY$ declare _tmp record; begin select * from A1() as dummy ( x double precision ) into _tmp; end; $BODY$ LANGUAGE 'plpgsql'; But I'm not sure if this is more effiecent than A3 r

Re: [GENERAL] PERFORM not working properly, please help..

2010-02-19 Thread Pavel Stehule
2010/2/19 : > I suppose some workaround would be to introduce temporary cursor: > > CREATE OR REPLACE FUNCTION A3() RETURNS VOID AS $BODY$ > declare _tmp record; > begin >  select * from A1() as dummy ( x double precision ) into _tmp; > end; > $BODY$ LANGUAGE 'plpgsql'; > > But I'm not sure if thi

Re: [GENERAL] PERFORM not working properly, please help..

2010-02-19 Thread Raymond O'Donnell
On 19/02/2010 09:59, wilcza...@op.pl wrote: > Hi Ray, thanks for reply. Your solution needs to be modified with alias to > get executed properly: > > CREATE OR REPLACE FUNCTION A3() RETURNS VOID AS $BODY$ > begin > select * from A1() as dummy ( x double precision ); > return; > end; > $BODY$ LA

Re: [GENERAL] PERFORM not working properly, please help..

2010-02-19 Thread Florent THOMAS
And what about that : http://www.postgresql.org/docs/8.4/interactive/xfunc-sql.html#XFUNC-SQL-FUNCTIONS-RETURNING-SET Maybe my french english disallowed me to understand right the question, but I think that this item could help in a way! Le vendredi 19 février 2010 à 11:04 +0100, Pavel Stehule a

Re: [GENERAL] How to get the users name from users group?

2010-02-19 Thread Magnus Hagander
2010/2/19 Jignesh Shah : > Hello All, > > I have created role "database-users" and inserted some of users inside it. > Could you tell me which query to use for listing out those users name? I went > through pg_users, pg_group but no luck. > > CREATE ROLE database-users >   NOSUPERUSER INHERIT NOC

Re: [GENERAL] PERFORM not working properly, please help..

2010-02-19 Thread wilczarz1
Hi Ray, thanks for reply. Your solution needs to be modified with alias to get executed properly: CREATE OR REPLACE FUNCTION A3() RETURNS VOID AS $BODY$ begin select * from A1() as dummy ( x double precision ); return; end; $BODY$ LANGUAGE 'plpgsql'; but when used: select * from A3() it genera

Re: [GENERAL] PERFORM not working properly, please help..

2010-02-19 Thread wilczarz1
Hi Pavel, thanks for reply. Your solution: CREATE OR REPLACE FUNCTION A3() RETURNS VOID AS $BODY$ begin return query select * from A1(); return; end; $BODY$ LANGUAGE 'plpgsql'; generates error "cannot use RETURN QUERY in a non-SETOF function" because A3 returns VOID. "Pavel Stehule" napisa

[GENERAL] set line number / input file name in psql

2010-02-19 Thread Adrian von Bidder
Heyho! I'm writing a little toy project, part of it involves scripts that pre- process sql and then feed it to psql. Is it possible to set the input filename / line number in psql? (Similar to how cpp includes this information so that the compiler can report the filename/line number of the C fi

Re: [GENERAL] PERFORM not working properly, please help..

2010-02-19 Thread Pavel Stehule
2010/2/19 : > Hi Pavel, thanks for reply. Your solution: > > CREATE OR REPLACE FUNCTION A3() RETURNS VOID AS $BODY$ > begin >  return query select * from A1(); >  return; > end; > $BODY$ LANGUAGE 'plpgsql'; > > generates error "cannot use RETURN QUERY in a non-SETOF function" because A3 > returns

[GENERAL] How to get the users name from users group?

2010-02-19 Thread Jignesh Shah
Hello All, I have created role "database-users" and inserted some of users inside it. Could you tell me which query to use for listing out those users name? I went through pg_users, pg_group but no luck. CREATE ROLE database-users NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; CREATE ROLE "dbuse

Re: [GENERAL] Getting number of affected row after performing update

2010-02-19 Thread Richard Huxton
On 19/02/10 05:42, Yan Cheng Cheok wrote: Of course, I get an error at line : IF @@ROWCOUNT=0 THEN May I know what is the correct PostgreSQL syntax for @@ROWCOUNT after update? Best place for this sort of information is the manuals: http://www.postgresql.org/docs/8.4/static/plpgsql-statement

Re: [GENERAL] Not able to access schema functions and table...

2010-02-19 Thread dipti shah
Thanks. That worked. On Fri, Feb 19, 2010 at 2:02 PM, Guillaume Lelarge wrote: > Le 19/02/2010 08:21, dipti shah a écrit : > > Hi, > > > > I have executed below queries. > > > > CREATE SCHEMA mydb_schema AUTHORIZATION postgres; > > > > GRANT ALL ON SCHEMA mydb_schema TO postgres; > > > > REVOKE

Re: [GENERAL] Not able to access schema functions and table...

2010-02-19 Thread Richard Huxton
On 19/02/10 07:21, dipti shah wrote: Hi, I have executed below queries. CREATE SCHEMA mydb_schema AUTHORIZATION postgres; GRANT ALL ON SCHEMA mydb_schema TO postgres; REVOKE ALL ON SCHEMA mydb_schema FROM PUBLIC; user1=> select * from mydb_schema.test1; ERROR: permission denied for mydb

Re: [GENERAL] Not able to access schema functions and table...

2010-02-19 Thread Guillaume Lelarge
Le 19/02/2010 08:21, dipti shah a écrit : > Hi, > > I have executed below queries. > > CREATE SCHEMA mydb_schema AUTHORIZATION postgres; > > GRANT ALL ON SCHEMA mydb_schema TO postgres; > > REVOKE ALL ON SCHEMA mydb_schema FROM PUBLIC; > REVOKE ALL ON FUNCTION mydb_schema.readtable() FROM PUB

[GENERAL] Not able to access schema functions and table...

2010-02-19 Thread dipti shah
Hi, I have executed below queries. CREATE SCHEMA mydb_schema AUTHORIZATION postgres; GRANT ALL ON SCHEMA mydb_schema TO postgres; REVOKE ALL ON SCHEMA mydb_schema FROM PUBLIC; REVOKE ALL ON FUNCTION mydb_schema.readtable() FROM PUBLIC; GRANT EXECUTE ON FUNCTION mydb_schema.readtable() to use