[GENERAL] Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
I have searched and searched and just cannot find the maximum lengths for input variables in a function i.e. CREATE FUNCTION test(input1 char(5), input2 varchar(50)) RETURNS void AS $$RAISE NOTICE('%,%'), $1, $2;$$ LANGUAGE plpgsql; Where do I find the 5 and the 50 it has to be somewhere I have

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
Yeah thats what I was starting to wonder if those lengths basically mean nothing. I am writing a ton of functions to unit test all of the functions in our app and am generating random strings and would like to pass the lengths to my random string generator so if it's varchar 50 I am generating a st

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-09-05 Thread jam3
Here is a bash script I wrote to print out mem config ffrom postgresconf.sql and os (centos 5.5 in this case). According to Gregory Smith in Postgresql 9.0 shared buffers should be appx 25-40% of avail Physical RAM. Also considerPostgres uses the OS Buffer as it access the physical data and log fil

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
Duh never mind I call brain cloud on that one, and thanks for all the help. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Where-is-the-char-and-varchar-length-in-pg-catalog-for-function-input-variables-tp5722845p5722880.html Sent from the PostgreSQL - general mailing

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
This is what I meant to post drop table test_table; create table test_table ( column1 char(20), column2 varchar(40) ) without oids; drop function test1(char(10), varchar(20)); create or replace function test1(c1 char(10), c2 varchar(20)) returns void as $$ BEGIN insert into

[GENERAL] Re: Where is the char and varchar length in pg_catalog for function input variables

2012-09-05 Thread jam3
How does postgres figure this out to throw the error msg? create table test_table ( column1 char(10), column2 varchar(20) ) without oids; create or replace function test1(c1 char(10), c2 varchar(20)) returns void as $$ BEGIN insert into test_table values ($1, $2); END $$

Re: [GENERAL] "Too far out of the mainstream"

2012-09-05 Thread jam3
MySQL doesn't even support self referential updates like update t1 set c1 ='value' where t1.id not in (select id from t1 where id > 100); Nor is it fully ACID compliant. And its online documentation is a nightmare. PgAdmin is infintely better than mysql workbench, heck anything is better than MyS

Re: [GENERAL] max_connections

2012-09-05 Thread jam3
According to http://www.postgresql.org/docs/8.3/static/kernel-resources.html The maximum shared memory usage of a connection in bytes is 1800 + 270 * max_locks_per_transaction max_locks_per_transaction default is 64 19080 Bytes or .018 mb's per connection or 1.819 mb at 100 default connect

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-09-14 Thread jam3
Here is the 9.0 versionand yes I meant maintenance_work_mem # Postgresql Memory Configuration and Sizing Script # By: James Morton # Last Updated 05/16/2012 # # Note This script is meant to be used with by the postgres user with a configured .pgpass file # It is for Postgres version 9 running on L