[GENERAL] numeric field overflow

2009-10-06 Thread Nurzhan Kirbassov
Good day. I may be misunderstanding the NUMERIC type description in the manual, so can anyone please help me with this? Description says: The scale of a numeric is the count of decimal digits in the fractional part, to the right of the decimal point. The precision of a numeric is the total count

Re: [GENERAL] numeric field overflow

2009-10-06 Thread Christophe Pettus
On Oct 5, 2009, at 11:20 PM, Nurzhan Kirbassov wrote: So, does the precision part of the numeric type really means number of digits to the left of the decimal point, or what ? NUMERIC is behaving as documented. The way to think of it is when you are inserting: INSERT INTO

Re: [GENERAL] numeric field overflow

2009-10-06 Thread Scott Marlowe
On Tue, Oct 6, 2009 at 12:20 AM, Nurzhan Kirbassov km.same...@gmail.com wrote: Good day. I may be misunderstanding the NUMERIC type description in the manual, so can anyone please help me with this? Description says: The scale of a numeric is the count of decimal digits in the fractional

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Stuart Bishop
On Mon, Oct 5, 2009 at 11:00 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Stuart Bishop wrote: On Mon, Oct 5, 2009 at 4:22 PM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: A similar issue was discussed just recently here:

Re: [GENERAL] numeric field overflow

2009-10-06 Thread Scott Ribe
However, I am not able to insert numbers that have number of digits equal to the precision and the scale equal to 0. Scale applies to the *column*. You defined your column to have a scale of 1, so you can't just claim that your value has scale 0 and claim an extra digit to the left of the

Re: [GENERAL] Documentation on standard conforming strings?

2009-10-06 Thread Albe Laurenz
Preston de Guise wrote: I don't yet properly understand the conforming strings implementation that came in 8.3 The manual (to me at least) has been a little imprecise in describing the implications for correctly inserting data with this enabled without getting back a plethora of warnings,

Re: [GENERAL] connection failure

2009-10-06 Thread Miklosi Attila
It's possible. There is only one additional function which returns the process id (by invoking getpid()) of the query source. You think that could cause the problem? My guess is it'ds because of the triggers... There are several tables that have triggers which call stored procedures that create

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Tim Bunce
On Mon, Oct 05, 2009 at 11:25:18PM +0100, Tim Bunce wrote: I'm planning to work with Andrew Dunstan on some enhancements to PL/Perl for PostgreSQL 8.5. I've written up some initial proposals here: http://blog.timbunce.org/2009/10/05/wishlist-of-plperl-enhancements-for-postgresql-8-5/

Re: [GENERAL] numeric field overflow

2009-10-06 Thread David W Noon
On Tue, 6 Oct 2009 12:20:11 +0600, Nurzhan Kirbassov wrote about [GENERAL] numeric field overflow: [snip] So, does the precision part of the numeric type really means number of digits to the left of the decimal point, or what ? No. The precision is the *total* number of decimal digits, both to

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread David Fetter
On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote: On Mon, Oct 05, 2009 at 11:25:18PM +0100, Tim Bunce wrote: I'm planning to work with Andrew Dunstan on some enhancements to PL/Perl for PostgreSQL 8.5. I've written up some initial proposals here:

[GENERAL] adding another node to our pitr config

2009-10-06 Thread Geoffrey
We are currently using WAL shipping to have a hot spare of our databases. We want to add another node to this configuration. The question is, what is the best way to go about this? Currently, our script checks to see if the WAL file already exists on the target server, if not, then we scp

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Stephen Frost
* David Fetter (da...@fetter.org) wrote: On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote: http://blog.timbunce.org/2009/10/05/wishlist-of-plperl-enhancements-for-postgresql-8-5/ Is someone working on adding the pl/perl hooks to be called as an anonymous PG function?

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
Stuart Bishop wrote: On Mon, Oct 5, 2009 at 11:00 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Stuart Bishop wrote: On Mon, Oct 5, 2009 at 4:22 PM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: A similar issue was discussed just recently here:

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Alvaro Herrera
David Fetter wrote: On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote: * Enable configuration of perl at initialization Add ability to specify in postgresql.conf some code to be run when a perl interpreter is initialized. For example: plperl.at_init_do = 'use lib

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Stuart Bishop
On Tue, Oct 6, 2009 at 8:28 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Stuart Bishop wrote: On Mon, Oct 5, 2009 at 11:00 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Stuart Bishop wrote: On Mon, Oct 5, 2009 at 4:22 PM, Alban Hertroys dal...@solfertje.student.utwente.nl

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
Stuart Bishop wrote: On Tue, Oct 6, 2009 at 8:28 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: mmkay.  So, any luck in constructing a test case? Yes. Just no luck getting it sent to the mailing list - seems to silently drop emails with attachments on me :-P :-( The test case

[GENERAL] LF PostgreSQL virtual Linux host provider in India and/or Asia Pac

2009-10-06 Thread Alan McKay
Hey folks, We have a tool for monitoring our website's performance, and would like to deploy it in a few places around the world. Mainly India and Asia Pac at this point. I know that DBs do not do well in a virtualized environment, but this one is a fairly light load (as compared to our

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
Alvaro Herrera wrote: Stuart Bishop wrote: The test case (invisible.sh) and required dump (foodump.sql - 60k) are at http://www.stuartbishop.net/invisible/ Got it, thanks, looking. Here's a slightly smaller test case; basically I removed the tsearch2 cruft and extra columns in the table.

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread David Fetter
On Tue, Oct 06, 2009 at 09:34:52AM -0400, Alvaro Herrera wrote: David Fetter wrote: On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote: * Enable configuration of perl at initialization Add ability to specify in postgresql.conf some code to be run when a perl interpreter is

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Richard Huxton
David Fetter wrote: On Tue, Oct 06, 2009 at 09:34:52AM -0400, Alvaro Herrera wrote: David Fetter wrote: On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote: The names won’t enable inter-function calling Inter-function calling could be handy, too. I agree. This would mean that the

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
Alvaro Herrera wrote: Here's a slightly smaller test case; basically I removed the tsearch2 cruft and extra columns in the table. One thing of note is that if the COPY commands is reduced to occupy less than one page in the target table, the problem does not occur. And here's an even

[GENERAL] is it possible to do an update with a nested select that references the outer update ?

2009-10-06 Thread Jonathan Vanasco
A typo in a webapp left ~150 records damaged overnight I was hoping to automate this, but may just use regex to make update statements for this basically , i have this situation: table a ( main record ) id , id_field , fullname table b ( extended profiles ) id_field ,

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
I think the previous patch to snapmgr.c was mistaken. Instead of fixing a single trouble spot, we're better off fixing PushActiveSnapshot so that any use of it that involves a snapshot that's subject to a future command counter update should create a new copy. This is correct because the 8.3

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
Alvaro Herrera wrote: create trigger onetest_t before update on onetest for each row execute procedure upd(); insert into onetest select a, repeat('xyzxz', 100), 'new' from generate_series(1, 50) a; BEGIN; SET transaction isolation level SERIALIZABLE; UPDATE onetest SET

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Filip Rembiałkowski
2009/10/6 Richard Huxton d...@archonet.com Are we looking down the wrong end of the telescope here? What if we had something more like the C binding for functions: CREATE FUNCTION foo(int,text,int) AS 'MyModule::internal_foo' LANGUAGE plperl; If you want inter-function calls you use

Re: [GENERAL] is it possible to do an update with a nested select that references the outer update ?

2009-10-06 Thread Alban Hertroys
On 6 Oct 2009, at 18:57, Jonathan Vanasco wrote: i think this attempt most clearly expresses what I was trying to do UPDATE table_a a set id_field = ( SELECT id_field FROM table_b b WHERE a.first_name || ' ' || b.last_name = a.fullname ) WHERE id_field IS NULL ; I'd be greatful if

[GENERAL] initdb failing

2009-10-06 Thread Sachin Srivastava
Hi all, I am using PostgreSQL 8.4.1 on Windows XP SP3 (64 -bit). This is what i get when i fire initdb command: /D:\Base\NetScope\pg\bininitdb.exe -d -n -U postgres -D d:\base\netscope\pg\data Running in debug mode. Running in noclean mode. Mistakes will not be cleaned up. Running in debug

Re: [GENERAL] initdb failing

2009-10-06 Thread Raymond O'Donnell
On 06/10/2009 19:00, Sachin Srivastava wrote: fixing permissions on existing directory d:/base/netscope/pg/data ... ok * creating subdirectories ... initdb: could not create directory d:/base/netscope/pg: File exists *initdb: data directory d:/base/netscope/pg/data not removed at user's

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Alvaro Herrera
Filip Rembiałkowski escribió: 2009/10/6 Richard Huxton d...@archonet.com Are we looking down the wrong end of the telescope here? What if we had something more like the C binding for functions: CREATE FUNCTION foo(int,text,int) AS 'MyModule::internal_foo' LANGUAGE plperl; If you

Re: [GENERAL] initdb failing

2009-10-06 Thread Sachin Srivastava
On 10/06/2009 11:41 PM, Raymond O'Donnell wrote: On 06/10/2009 19:00, Sachin Srivastava wrote: fixing permissions on existing directory d:/base/netscope/pg/data ... ok * creating subdirectories ... initdb: could not create directory d:/base/netscope/pg: File exists *initdb: data directory

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
Alvaro Herrera wrote: I think the previous patch to snapmgr.c was mistaken. Instead of fixing a single trouble spot, we're better off fixing PushActiveSnapshot so that any use of it that involves a snapshot that's subject to a future command counter update should create a new copy. For a

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Richard Huxton
Alvaro Herrera wrote: Filip Rembiałkowski escribió: 2009/10/6 Richard Huxton d...@archonet.com Are we looking down the wrong end of the telescope here? What if we had something more like the C binding for functions: CREATE FUNCTION foo(int,text,int) AS 'MyModule::internal_foo' LANGUAGE

[GENERAL] interface for non-SQL people

2009-10-06 Thread pere roca
hi, some nice tool over there to let non-SQL knowing people to construct their queries? I'm using pgAdmin III but I know some SQL. there is no other option than constructing an HTML with forms, drop-down menus...? thanks, pERE -- View this message in context:

Re: [GENERAL] initdb failing

2009-10-06 Thread Scott Mead
On Tue, Oct 6, 2009 at 3:09 PM, Sachin Srivastava sachin.srivast...@enterprisedb.com wrote: On 10/06/2009 11:41 PM, Raymond O'Donnell wrote: On 06/10/2009 19:00, Sachin Srivastava wrote: fixing permissions on existing directory d:/base/netscope/pg/data ... ok * creating subdirectories

[GENERAL] contrib/plantuner - enable PostgreSQL planner hints

2009-10-06 Thread Oleg Bartunov
Hi there, this is an announcement of our new contribution module for PostgreSQL - Plantuner - enable planner hints (http://www.sai.msu.su/~megera/wiki/plantuner). Example: =# LOAD 'plantuner'; =# create table test(id int); =# create index id_idx on test(id); =# create index id_idx2 on

Re: [GENERAL] attempted to lock invisible tuple - PG 8.4.1

2009-10-06 Thread Alvaro Herrera
Stuart Bishop wrote: I don't think the committed patch touches anything involved in what you're testing, but if you could grab CVS tip from the 8.4 branch (or the snapshot from ftp.postgresql.org:/pub/snapshot/stable/8.4 ) and give it a try, that'd be great. I trigger the same error with a

Re: [GENERAL] initdb failing

2009-10-06 Thread Sachin Srivastava
On 10/07/2009 01:24 AM, Scott Mead wrote: On Tue, Oct 6, 2009 at 3:09 PM, Sachin Srivastava sachin.srivast...@enterprisedb.com mailto:sachin.srivast...@enterprisedb.com wrote: On 10/06/2009 11:41 PM, Raymond O'Donnell wrote: On 06/10/2009 19:00, Sachin Srivastava wrote:

Re: [GENERAL] Fatal error on start

2009-10-06 Thread Andrew Bartley
Thanks, I found it, a permissions issue using sudo to start postgres. Thanks anyway. 2009/10/6 纪晓曦 sheep...@gmail.com Did you delete some log or data in your PGDATA directory? 2009/10/6 Andrew Bartley ambart...@gmail.com does anyone know what this is? Trying to start postgres version:

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Tim Bunce
On Tue, Oct 06, 2009 at 09:18:22AM -0700, David Fetter wrote: On Tue, Oct 06, 2009 at 09:34:52AM -0400, Alvaro Herrera wrote: David Fetter wrote: On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote: * Enable configuration of perl at initialization Add ability to specify

[GENERAL] Composite types and tables - when to use?

2009-10-06 Thread Postgres User
Browsing the docs last night, I realized that I've never taken advantage of Postgres' powerful composite types. But a question came to mind- in what scenarios should you use a composite type in a table structure? That is, I can see the benefits of a composiite type insofar as it essentially lets

[GENERAL] Composite types and tables - when to use?

2009-10-06 Thread Postgres User
Browsing the docs last night, I realized that I've never taken advantage of Postgres' powerful composite types.  But a question came to mind- in what scenarios should you use a composite type in a table structure?  That is, I can see the benefits of a composiite type insofar as it essentially lets

Re: [GENERAL] interface for non-SQL people

2009-10-06 Thread Postgres User
EMS SQL Manager has a visual query builder, but it's a commerical product, ie it aint free. On Tue, Oct 6, 2009 at 12:47 PM, pere roca pero...@gmail.com wrote:  hi,  some nice tool over there to let non-SQL knowing people to construct their queries? I'm using pgAdmin III but I know some SQL.

[GENERAL] pg_dumpall asking for password for each database

2009-10-06 Thread Krzysztof Barlik
Hi, is it possible to force pg_dumpall to ask for password only once (connecting as superuser 'postgres') ? Entering it for every database is a bit annoying. Thanks, Krzysztof -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Composite types and tables - when to use?

2009-10-06 Thread Merlin Moncure
On Tue, Oct 6, 2009 at 4:43 PM, Postgres User postgres.develo...@gmail.com wrote: Browsing the docs last night, I realized that I've never taken advantage of Postgres' powerful composite types.  But a question came to mind- in what scenarios should you use a composite type in a table

Re: [GENERAL] pg_dumpall asking for password for each database

2009-10-06 Thread Scott Mead
2009/10/6 Krzysztof Barlik kbar...@wp.pl Hi, is it possible to force pg_dumpall to ask for password only once (connecting as superuser 'postgres') ? Entering it for every database is a bit annoying. Kind of, you'll either use an environment variable:

Re: [GENERAL] pg_dumpall asking for password for each database

2009-10-06 Thread Joshua D. Drake
On Tue, 2009-10-06 at 22:59 +0200, Krzysztof Barlik wrote: Hi, is it possible to force pg_dumpall to ask for password only once (connecting as superuser 'postgres') ? Entering it for every database is a bit annoying. take a look at .pgpass documentation Thanks, Krzysztof --

Re: [GENERAL] Postgres won't start. Nothing in the log.

2009-10-06 Thread Tim Uckun
I know, from IRC, the problem has been solved, there was no space on the disk ... Unfortunately, i haven't logs. Yes. Thanks to everybody on the IRC who helped me out. The suggestion that was most helpful was to call the posgres binary directly. /usr/lib/postgresql/8.3/bin/postgres. Calling

Re: [GENERAL] pg_dumpall asking for password for each database

2009-10-06 Thread Alvaro Herrera
Krzysztof Barlik wrote: Hi, is it possible to force pg_dumpall to ask for password only once (connecting as superuser 'postgres') ? Entering it for every database is a bit annoying. What version are you running? IIRC it should remember the password between databases. -- Alvaro Herrera

Re: [GENERAL] interface for non-SQL people

2009-10-06 Thread Alvaro Herrera
pere roca escribió: hi, some nice tool over there to let non-SQL knowing people to construct their queries? I'm using pgAdmin III but I know some SQL. there is no other option than constructing an HTML with forms, drop-down menus...? IIRC pgAdmin has got a graphical query builder.

Re: [GENERAL] Vacuumdb Fails: Huge Tuple

2009-10-06 Thread APseudoUtopia
On Thu, Oct 1, 2009 at 5:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: APseudoUtopia apseudouto...@gmail.com writes: Here's what happened: $ vacuumdb --all --full --analyze --no-password vacuumdb: vacuuming database postgres vacuumdb: vacuuming database web_main vacuumdb: vacuuming of database

[GENERAL] Need help in spi_prepare errors

2009-10-06 Thread paresh masani
Hi, I have been getting strange behaviors in using spi_prepare and spi_exec_prepared. The below function works fine (every thing is hard coded): CREATE OR REPLACE FUNCTION init() RETURNS TEXT AS $$ my $prepared = spi_prepare(INSERT INTO mytable (\col1\, \col2\) VALUES (\$1, \$2),