Re: [GENERAL] How to dump JUST procedures/funnctions?

2010-03-22 Thread Carlo Stonebanks
Afaik no, you can make a schema-dump and extract the function declarations from the dump. Yeah, that's what I was doing. Bloody tedious. Thanks anyway! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Full Text Search: howto manage multiple languages ?

2010-03-22 Thread Oleg Bartunov
On Sun, 21 Mar 2010, C?dric MOULLET wrote: Hi, I have the following problem with the FTS: the database contains information in several languages. As I understand, the FTS requires to associate a language when ts_vector is created. Is there any way to make a kind of FTS doesn't needs to be

Re: [GENERAL] Licence

2010-03-22 Thread Adrian von Bidder
On Sunday 21 March 2010 21.11:56 Lew wrote: In at least some jurisdictions, if one party to a contract writes the language without input or emendation from the other party, that allows the other party to impose any reasonable interpretation on the wording. IOW, ambiguity is resolved in favor

Re: [GENERAL] Restrict allowed database names?

2010-03-22 Thread Adrian von Bidder
On Sunday 21 March 2010 02.01:27 Scott Mead wrote: On Sat, Mar 20, 2010 at 5:24 PM, Adam Seering aseer...@mit.edu wrote: Hi, I'm trying to set up an internal general-purpose PostgreSQL server installation. I want most users with login access to the server to be able

Re: [GENERAL] Full Text Search: howto manage multiple languages ?

2010-03-22 Thread Cédric MOULLET
Thanks for your answer, Could you point me to documentation regarding the configuration (dictionary creation, synonym creation) of FTS and how to do it ? Thanks, Cédric 2010/3/22 Oleg Bartunov o...@sai.msu.su On Sun, 21 Mar 2010, C?dric MOULLET wrote: Hi, I have the following problem with

Re: [GENERAL] AIX postgresql error

2010-03-22 Thread Albe Laurenz
Vikram Patil wrote: Thanks Laurence for Reply. I can actually connect to server using network. I am just trying to avoid this warning. Your solution for listen_address will work but I want to keep it as * . Somehow it doesn't complain on any other *nix Operation Systems. Probably IPv6 is

[GENERAL] Determining the OID of a certain type

2010-03-22 Thread Carsten Kropf
Hi *, I wanted to ask, if there is a method to determine the oid of a certain type using the C backend interface? I need to get access to a specific type for an IAM and therefore i want to construct an IndexTuple using the specified methods. However, I need the OID of the specific type for it.

Re: [GENERAL] How to dump JUST procedures/funnctions?

2010-03-22 Thread Tom Lane
Carlo Stonebanks stonec.regis...@sympatico.ca writes: Afaik no, you can make a schema-dump and extract the function declarations from the dump. Yeah, that's what I was doing. Bloody tedious. Thanks anyway! It seems like it could be automated. pg_dump -Fc -s mydb mydb.dump

Re: [GENERAL] Determining the OID of a certain type

2010-03-22 Thread Tom Lane
Carsten Kropf ckro...@fh-hof.de writes: I wanted to ask, if there is a method to determine the oid of a certain type using the C backend interface? Starting from what? For built-in types it's usual practice to use the #define from pg_type.h, if there is one. If you have a string name for the

Re: [GENERAL] Daylight savings time confusion

2010-03-22 Thread Rob Richardson
Tom, You said, It seems to me that you're not entirely understanding how timestamps work in Postgres. That is an understatement! Thank you very much for your explanation. I have forwarded it to the other members of my development group, with my suggestion that we follow your ideas for future

[GENERAL] Holger Kalbas

2010-03-22 Thread william wayne
http://pacakm.w.interia.pl/eric.html _ The New Busy is not the old busy. Search, chat and e-mail from your inbox.

[GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Thom Brown
Hi, I noticed there's 66 files in my pg_xlog directory. I changed my checkpoint_segments from 32 to 3 as I noticed it was too high, restarted PosgreSQL, but there are still 66 files in that directory and they're taking up about 1.1G. How can I get this list of files down? Thanks Thom

Re: [GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Tom Lane
Thom Brown thombr...@gmail.com writes: I noticed there's 66 files in my pg_xlog directory. I changed my checkpoint_segments from 32 to 3 as I noticed it was too high, restarted PosgreSQL, but there are still 66 files in that directory and they're taking up about 1.1G. How can I get this

[GENERAL] Warm Standby Setup Documentation

2010-03-22 Thread Ogden
I have looked all over but could not find any detailed docs on setting up a warm standby solution using PostgreSQL 8.4. I do know of http://www.postgresql.org/docs/8.4/static/warm-standby.html but was wondering if there was a more detailed document on this topic. Are people using this as a

Re: [GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Thom Brown
On 22 March 2010 14:19, Tom Lane t...@sss.pgh.pa.us wrote: Thom Brown thombr...@gmail.com writes: I noticed there's 66 files in my pg_xlog directory. I changed my checkpoint_segments from 32 to 3 as I noticed it was too high, restarted PosgreSQL, but there are still 66 files in that

Re: [GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Tom Lane
Thom Brown thombr...@gmail.com writes: On 22 March 2010 14:19, Tom Lane t...@sss.pgh.pa.us wrote: Force a checkpoint, if one hasn't happened already. Yeah, I've run a CHECKPOINT too, but no joy. Still the same number of files. Hm, it works for me. What PG version is this exactly? Are you

Re: [GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Thom Brown
On 22 March 2010 14:29, Tom Lane t...@sss.pgh.pa.us wrote: Thom Brown thombr...@gmail.com writes: On 22 March 2010 14:19, Tom Lane t...@sss.pgh.pa.us wrote: Force a checkpoint, if one hasn't happened already. Yeah, I've run a CHECKPOINT too, but no joy. Still the same number of files.

Re: [GENERAL] Determining the OID of a certain type

2010-03-22 Thread Carsten Kropf
Thanks a lot, basically I looked inside these functions in parse_type.c and did not find an easy to use application here. So I considered trying to construct the required arguments passed to typenameType. However, during the development, I found the following function: Oid

Re: [GENERAL] Daylight savings time confusion

2010-03-22 Thread Alban Hertroys
On 22 Mar 2010, at 14:08, Rob Richardson wrote: One question: We have customers all over the world. It would be best if we could rely on the operating system (usually Windows Server 2003) to tell us what time zone we're in, rather than asking for a specific timezone when we want to know a

Re: [GENERAL] Determining the OID of a certain type

2010-03-22 Thread Tom Lane
Carsten Kropf ckro...@fh-hof.de writes: basically I looked inside these functions in parse_type.c and did not find an easy to use application here. So I considered trying to construct the required arguments passed to typenameType. However, during the development, I found the following

Re: [GENERAL] pgreplay log file replayer released

2010-03-22 Thread Greg Stark
On Wed, Mar 17, 2010 at 2:06 PM, Albe Laurenz laurenz.a...@wien.gv.at wrote: I announce the first release of pgreplay, version 0.9.0 (Beta). Project home page: http://pgreplay.projects.postgresql.org/ pgreplay reads a PostgreSQL log file (*not* a WAL file), extracts the SQL statements and

Re: [GENERAL] Determining the OID of a certain type

2010-03-22 Thread Carsten Kropf
Oh, thanks, that's right, I see that this function I used before, searches only in the currently used schema. The usage of parseTypeString is comparable easy, as well, so based on your hints, I will probably use this function. Best regards Carsten Kropf Am 22.03.2010 um 16:23 schrieb Tom

Re: [GENERAL] stopping processes, preventing connections

2010-03-22 Thread Dimitri Fontaine
Scott Marlowe scott.marl...@gmail.com writes: It was a few posts back, but our discussion point was minor point upgrades and the fact that OP was running 8.3.1 and not sure there were updates to 8.3.9 (or latest) out there for debian. I'm quite sure debian has 8.3.9 out by now. Yes:

Re: [GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Greg Smith
Thom Brown wrote: I noticed there's 66 files in my pg_xlog directory. I changed my checkpoint_segments from 32 to 3 as I noticed it was too high, restarted PosgreSQL, but there are still 66 files in that directory and they're taking up about 1.1G. How can I get this list of files down? A

[GENERAL] user variables in session

2010-03-22 Thread Igor Shevchenko
Hi All, I wasn't able to find any functions which would allow me to save/fetch/remove user variables local to pgsql session, e.g. - 1. select setvar('user variable name', 'user value'); 2. select getvar('user variable name'); 3. select delvar('user variable name'); Is there any way to do this

Re: [GENERAL] user variables in session

2010-03-22 Thread Merlin Moncure
On Mon, Mar 22, 2010 at 11:55 AM, Igor Shevchenko i...@carcass.ath.cx wrote: Hi All, I wasn't able to find any functions which would allow me to save/fetch/remove user variables local to pgsql session, e.g. - 1. select setvar('user variable name', 'user value'); 2. select getvar('user

Re: [GENERAL] strange

2010-03-22 Thread Greg Smith
Tom Lane wrote: Szymon Guz mabew...@gmail.com writes: I've got a simple query. When I use explain analyze it lasts 7 times slower. Why? You've got a machine where gettimeofday() is really slow. This is common on cheap PC hardware :-( I'd be curious to know more about the

[GENERAL] Avoiding deadlocks on mass delete / update

2010-03-22 Thread Роман Маширов
I've got a simple 'spool' table, one process 'worker' reads and updates this table, other 'stat' performs 'delete ... where ... returning *'. Sometimes I've got dedlocks on delete operation in 'stat', seems like at the moment of expiration of data by timeout some state changes arrived from

Re: [GENERAL] strange

2010-03-22 Thread Tom Lane
Greg Smith g...@2ndquadrant.com writes: Tom Lane wrote: You've got a machine where gettimeofday() is really slow. This is common on cheap PC hardware :-( I'd be curious to know more about the hardware and operating system Szymon is using if you suspect this is the case. I keep hearing

Re: [GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Thom Brown
On 22 March 2010 16:06, Greg Smith g...@2ndquadrant.com wrote: Thom Brown wrote: I noticed there's 66 files in my pg_xlog directory. I changed my checkpoint_segments from 32 to 3 as I noticed it was too high, restarted PosgreSQL, but there are still 66 files in that directory and they're

Re: [GENERAL] Reducing excess files in pg_xlog

2010-03-22 Thread Tom Lane
Thom Brown thombr...@gmail.com writes: I've just forced a new WAL file by writing lots of stuff to a table, then deleting it. It appears to be recyling the filenames now. The latest files end in DD and DE, and the earliest is DF. Presumably these will slowly get eaten up until it's just

[GENERAL] Create a function that updates the record with and timestamps

2010-03-22 Thread Chris Barnes
I would like to have postgres update the last_modified column with the current_date on an update of the record. I am not sure if there is a very simple way of doing this? Or, do I need to create a function and a trigger to call the row and update with new data and set the last_modified

Re: [GENERAL] strange

2010-03-22 Thread Szymon Guz
2010/3/22 Greg Smith g...@2ndquadrant.com Tom Lane wrote: Szymon Guz mabew...@gmail.com mabew...@gmail.com writes: I've got a simple query. When I use explain analyze it lasts 7 times slower. Why? You've got a machine where gettimeofday() is really slow. This is common on cheap PC

Re: [GENERAL] Create a function that updates the record with and timestamps

2010-03-22 Thread A. Kretschmer
In response to Chris Barnes : I would like to have postgres update the last_modified column with the current_date on an update of the record. I am not sure if there is a very simple way of doing this? Or, do I need to create a function and a trigger to call the row and update with new

[GENERAL] Postgresql error from interface

2010-03-22 Thread Bob Pawley
Hi I have an interface (Delphi) for my Postgresql database, that is telling me that I have an inconsistancy between one of the Postgresql triggers and a Postgresql table. The problem for me is - the message doesn't give me enough information to determine which trigger has the error. Is there

Re: [GENERAL] Postgresql error from interface

2010-03-22 Thread Tom Lane
Bob Pawley rjpaw...@shaw.ca writes: I have an interface (Delphi) for my Postgresql database, that is telling me that I have an inconsistancy between one of the Postgresql triggers and a Postgresql table. The problem for me is - the message doesn't give me enough information to determine

Re: [GENERAL] Create a function that updates the record with and timestamps

2010-03-22 Thread Chris Barnes
I see examples for updating tables using a function, but I would like to pull the row requested and modify the last_modified column with current_date and push the modified data back into the same row. I did see an example of how to use old and new at this at this link, but it is

Re: [GENERAL] pgreplay log file replayer released

2010-03-22 Thread Dimitri Fontaine
Greg Stark gsst...@mit.edu writes: Do you have a multi-threaded model that tracks which transactions each query belonged to and runs them concurrently like they were in the original setup? That's what I've been looking for. Tsung does that and has been doing it for… quite some time. It even

[GENERAL] server-side extension in c++

2010-03-22 Thread Igor
Hi All, Is there an easy way to add c++ files to my simple pgsql module ? My Makefile is as follows - === MODULES = pg_uservars DATA_built = pg_uservars.sql PGXS := $(shell pg_config --pgxs) include $(PGXS) === I've got pg_uservars.c and hv.cc and I'd like to compile hv.cc via g++. I'm aware

Re: [GENERAL] How to dump JUST procedures/funnctions?

2010-03-22 Thread Tony Wasson
On Sat, Mar 20, 2010 at 11:09 PM, Carlo Stonebanks stonec.regis...@sympatico.ca wrote: Is pg_get_functiondef an 8.4 appears to be an 8.4 function? I don't see it in the 8.3 documentation and the servers in question are all 8.3. Any alternatives for 8.3? pg_proc has the code body, but not

Re: [GENERAL] Create a function that updates the record with and timestamps

2010-03-22 Thread Adrian Klaver
On Monday 22 March 2010 10:55:36 am Chris Barnes wrote: I see examples for updating tables using a function, but I would like to pull the row requested and modify the last_modified column with current_date and push the modified data back into the same row. I did see an example of how to use

[GENERAL] string functions and operators

2010-03-22 Thread Neil Stlyz
Hello, I have a dilema and I was hoping someone here may offer guidance or assistance. I bet this is a very simple question for someone out there but I am having problems coming up with a solution. Here it is... suppose I have a field with the following values: 77.1 77.2 134.1 134.2 134.3

Re: [GENERAL] string functions and operators

2010-03-22 Thread John R Pierce
Neil Stlyz wrote: Hello, I have a dilema and I was hoping someone here may offer guidance or assistance. I bet this is a very simple question for someone out there but I am having problems coming up with a solution. Here it is... suppose I have a field with the following values: 77.1

[GENERAL] Replace null values

2010-03-22 Thread Nilesh Govindarajan
Hi, In my query, some rows have null values (length 0). I wish to replace them with some constant. I think I am wrong somewhere in this query using coalesce(): select coalesce(u.name, 'anon'), nodecount from users u, ( select n.uid userid, count(n.nid) nodecount from node n group by n.uid

Re: [GENERAL] Replace null values

2010-03-22 Thread John R Pierce
Nilesh Govindarajan wrote: Hi, In my query, some rows have null values (length 0). a NULL value is not length 0, NULL is not the empty string, rather, NULL is no value at all. if you want to change a 0 length string to something, use a CASE or something. select CASE WHEN u.name = ''

Re: [GENERAL] Replace null values

2010-03-22 Thread Nilesh Govindarajan
On 03/23/2010 10:07 AM, John R Pierce wrote: Nilesh Govindarajan wrote: Hi, In my query, some rows have null values (length 0). a NULL value is not length 0, NULL is not the empty string, rather, NULL is no value at all. if you want to change a 0 length string to something, use a CASE or

Re: [GENERAL] Replace null values

2010-03-22 Thread Nilesh Govindarajan
On 03/23/2010 09:47 AM, Osvaldo Kussama wrote: 2010/3/23 Nilesh Govindarajanli...@itech7.com: Hi, In my query, some rows have null values (length 0). NULL or a zero lenght string? I wish to replace them with some constant. I think I am wrong somewhere in this query using coalesce():

Re: [GENERAL] Create a function that updates the record with and timestamps

2010-03-22 Thread A. Kretschmer
In response to Richard Sickler : I am not sure if there is a very simple way of doing this? Or, do I need to create a function and a trigger to call the row and update with new data and set the last_modified to current_date? Yes, that's the way, a TRIGGER on