Re: [GENERAL] Can't start postgresql 8.3.7

2009-06-26 Thread Sam Wun
I copied the sample config file to postgresql workign directory before trying to start postgresql: # pwd /usr/local/share/postgresql twp1:postgresql # cp postgresql.conf.sample ../../pgsql/data/postgresql.conf On Fri, Jun 26, 2009 at 4:04 PM, Sam Wunswun2...@gmail.com wrote: Hi, I had been

[GENERAL] Can't start postgresql 8.3.7

2009-06-26 Thread Sam Wun
Hi, I had been running postgresql 8.3.7 in freebsd for some time, but after I changed its postgresql.conf file, it can't start any more eventhoguh I changed the config back to its original file. Anything wrong? Here is the errros: Jun 26 15:58:52 twp1 postgres[1394]: [1-1] FATAL: could not

Re: [GENERAL] Custom runtime variables

2009-06-26 Thread Scott Bailey
Scott Bailey arta...@comcast.net writes: I added the following lines to my postgresql.conf file: custom_variable_classes = 'foo' foo.name = '1s' Now if I do show foo.name I get '1s' But it does not show up in show all or in pg_settings. No, it doesn't. It should still work in set/show

Re: [GENERAL] Custom runtime variables

2009-06-26 Thread Pavel Stehule
2009/6/26 Scott Bailey arta...@comcast.net: Scott Bailey arta...@comcast.net writes: I added the following lines to my postgresql.conf file: custom_variable_classes = 'foo' foo.name = '1s' Now if I do show foo.name I get '1s' But it does not show up in show all or in pg_settings. No, it

[GENERAL] masking the code

2009-06-26 Thread luca . ciciriello
in fretta! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8956d=20090626 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Custom runtime variables

2009-06-26 Thread Andreas Kretschmer
Scott Bailey arta...@comcast.net wrote: Thanks Tom. So how about accessing it from from plpgsql or sql? test=# select * from current_setting('myvar.foo'); current_setting - (1 Zeile) Zeit: 0,163 ms test=*# test=*# set myvar.foo='bla'; SET Zeit: 0,117 ms test=*# select * from

Re: [GENERAL] masking the code

2009-06-26 Thread Pavel Stehule
://adv.email.it/cgi-bin/foclick.cgi?mid=8956d=20090626 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] masking the code

2009-06-26 Thread Massa, Harald Armin
, fai in fretta! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8956d=20090626 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- GHUM Harald Massa persuadere et

[GENERAL] PL/pgSQL EXECUTE quote_ident(), and SQL injection

2009-06-26 Thread Knut P. Lehre
Is there any known way to inject SQL into a function similar to this? create function testinjection(text,integer)  returns void as $BODY$ declare begin execute 'update '||quote_ident($1)||' set c=null where id='||$2; return; end; $BODY$ language 'plpgsql' volatile security definer; grant execute

Re: [GENERAL] Trigger Function and backup

2009-06-26 Thread Nishkarsh
hello Arndt, Thanks for the input. I was successfully able to implement rubyrep, on a windows system (I used windows 7). Is there any way i can implement Master Slave replication by rubyrep. Regards Nishkarsh Arndt Lehmann-2 wrote: Hi Merlin, you could also consider giving rubyrep a

Re: [GENERAL] PL/pgSQL EXECUTE quote_ident(), and SQL injection

2009-06-26 Thread Knut P. Lehre
Since this stripped down example function looks a bit meaningless, I'd like to rephrase the question to make it more clear: Does quote_ident() prevent all ways of trying to inject SQL into $1 so that the testinjection function cannot be used to do anything else than setting column c to null in

Re: [GENERAL] PL/pgSQL EXECUTE quote_ident(), and SQL injection

2009-06-26 Thread Pavel Stehule
Hello I thing, so quote_ident is secure. you can add more security via explicit casting to regclass type - check if value of variable is really relation identifier: postgres=# select quote_ident('omega b')::regclass; quote_ident - omega b (1 row) postgres=# select

Re: [GENERAL] Bug in ecpg lib ?

2009-06-26 Thread leif
Hi Laurenz, Thanks for the suggestion. It sure wasn't easy, but I should have done that right away. It turned out not to be in the ecpg module, but somewhere in my own code (of course ;-) ). At least I haven't been able to reproduce it in a simple example and I haven't figured out where

Re: [GENERAL] Can't start postgresql 8.3.7

2009-06-26 Thread Tom Lane
Sam Wun swun2...@gmail.com writes: I had been running postgresql 8.3.7 in freebsd for some time, but after I changed its postgresql.conf file, it can't start any more eventhoguh I changed the config back to its original file. Anything wrong? Jun 26 15:58:52 twp1 postgres[1394]: [1-1] FATAL:

Re: [GENERAL] Need suggestions

2009-06-26 Thread Filip Rembiałkowski
2009/6/25 Jack W dbdevelop2...@gmail.com Maybe for maintainence purpose or schema change. For example as you mentioned above, if using several tablespaces located on different hard drives. If one hard drive is damaged, the database on that hard drive will not be available. How about other

Re: [GENERAL] masking the code

2009-06-26 Thread David Fetter
On Fri, Jun 26, 2009 at 10:56:34AM +0200, luca.cicirie...@email.it wrote: I've wrote a PLPGSQL stored procedure for a DB I've to delivery to my customer. The problem is that I want to hide the code of the stored procedure. I don't want that my customer is able to read the code of the my sp.

[GENERAL] Need help using function

2009-06-26 Thread Bob Pawley
Hi I want to try using functions but I am having trouble understanding return. This is the function - CREATE OR REPLACE FUNCTION p_id.ip_orient_3() RETURNS integer AS $BODY$ Begin Insert into fluids (fluid_id) values ('1') ; End; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100; ALTER

Re: [GENERAL] Need help using function

2009-06-26 Thread John R Pierce
Bob Pawley wrote: Hi I want to try using functions but I am having trouble understanding return. ... The error message - control reached end of function without RETURN I have attempted adding - Return integer; to the end of the function with no success. I'd try adding RETURN

Re: [GENERAL] Need help using function

2009-06-26 Thread Bob Pawley
That worked. However, perhaps I don't understand the idea of a function. If the , in this case ('1'), was in fact an unknown variable what would the return be? Bob - Original Message - From: John R Pierce pie...@hogranch.com To: Bob Pawley rjpaw...@shaw.ca;

Re: [GENERAL] Need help using function

2009-06-26 Thread Jonah H. Harris
On Fri, Jun 26, 2009 at 1:28 PM, Bob Pawley rjpaw...@shaw.ca wrote: However, perhaps I don't understand the idea of a function. Please review the manual for examples. http://www.postgresql.org/docs/8.3/static/plpgsql.html Specifically,

Re: [GENERAL] Need help using function

2009-06-26 Thread Bob Pawley
Ok, it seem that is not what I am seeking. I have a triggered function that works quite well on an insert into a table. What I would like to do is trigger that same function when conditions are updated in an other table. I'm trying to avoid having to copy the whole function over to an update

Re: [GENERAL] Problems with postgres online backup - restore

2009-06-26 Thread Gerhard Wiesinger
Hello Richard, OK, understood it and looks to me a good system with whole block overwrite and then the deltas. Thnx. Ciao, Gerhard -- http://www.wiesinger.com/ On Fri, 26 Jun 2009, Richard Huxton wrote: Gerhard Wiesinger wrote: Hello, OK, what's then the difference doing a

[GENERAL] Optimal values for 500 connections

2009-06-26 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm wondering what are the correct values in postgresql.conf for max_connections = 500 ... The values I had in 8.2.13 conf file worked without a problem but with the new 8.3.7 postmaster simply refuses to start. Any pointers would be highly

Re: [GENERAL] Optimal values for 500 connections

2009-06-26 Thread Scott Marlowe
On Fri, Jun 26, 2009 at 12:52 PM, Pedro Doria Meunierpdo...@netmadeira.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm wondering what are the correct values in postgresql.conf for max_connections = 500 ... The values I had in 8.2.13 conf file worked without a problem

Re: [GENERAL] Optimal values for 500 connections

2009-06-26 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thank you Scott! As always your advice is right to the point ;-) That solved it. Best regards, Pedro Doria Meunier GSM: +351 96 17 20 188 Skype: pdoriam Scott Marlowe wrote: On Fri, Jun 26, 2009 at 12:52 PM, Pedro Doria

[GENERAL] Postgresql 8.3.7 SSL support

2009-06-26 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi (again :] ) PGSQL 8.3.7 rpms for x86_64 aren't compiled with ssl support?! I've my server.* files in the data folder but this is what I get: Error connecting to the server: server does not support SSL, but SSL was required BR, - -- Pedro Doria

Re: [GENERAL] Custom runtime variables

2009-06-26 Thread artacus
- Original Message - From: Andreas Kretschmer akretsch...@spamfence.net To: pgsql-general@postgresql.org Sent: Friday, June 26, 2009 1:58:08 AM GMT -08:00 US/Canada Pacific Subject: Re: [GENERAL] Custom runtime variables Scott Bailey arta...@comcast.net wrote: Thanks Tom. So how

Re: [GENERAL] masking the code

2009-06-26 Thread artacus
Obfuscated function source code (not wanted) Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate backups and other administrative tasks. To prevent non-super-users

Re: [GENERAL] Postgresql 8.3.7 SSL support

2009-06-26 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (blush) (blush) Sorry for the noise I forgot to ssl=on in postgresql.conf (blush) (blush) Pedro Doria Meunier GSM: +351 96 17 20 188 Skype: pdoriam Pedro Doria Meunier wrote: Hi (again :] ) PGSQL 8.3.7 rpms for x86_64 aren't compiled

[GENERAL] data modeling question

2009-06-26 Thread Brandon Metcalf
I asked a question similar to this a couple of weeks ago, but the requirement has changed a bit and I want to be sure I'm designing my tables correctly. I have the following table: CREATE TABLE workorder ( numberVARCHAR(8), quantity INTEGER, generic BOOLEAN, PRIMARY KEY

Re: [GENERAL] masking the code

2009-06-26 Thread Dimitri Fontaine
Hi, Le 26 juin 09 à 10:56, luca.cicirie...@email.it a écrit : Do exist a way to mask the code of the store procedure shipped with my DB? There's a way to do it which is not intended to cover this need: write the procedure code in C, and only ship the .so and .sql, not the .c code. You'll

Re: [GENERAL] Replication

2009-06-26 Thread Dimitri Fontaine
Hi, Le 25 juin 09 à 11:26, Jasen Betts a écrit : On 2009-06-23, Mike Christensen m...@kitchenpc.com wrote: Does anyone actually have that (any node can go down and the others still replicate amongst themselves?) you are describing usenet. (it was not designed for relational database

Re: [GENERAL] masking the code

2009-06-26 Thread Scott Marlowe
On Fri, Jun 26, 2009 at 1:37 PM, arta...@comcast.net wrote: Obfuscated function source code (not wanted) Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate

Re: [GENERAL] Replication

2009-06-26 Thread Gerry Reno
Dimitri Fontaine wrote: Hi, Le 25 juin 09 à 11:26, Jasen Betts a écrit : On 2009-06-23, Mike Christensen m...@kitchenpc.com wrote: Does anyone actually have that (any node can go down and the others still replicate amongst themselves?) you are describing usenet. (it was not designed for

Re: [GENERAL] horizontal sharding

2009-06-26 Thread mobiledreamers
can someone show how to setup pgpool 2 in parallel *query* mode ie horizontal partitioningthanks a lot On Fri, Jun 26, 2009 at 5:35 PM, mobiledream...@gmail.com wrote: can someone show how to setup pgpool 2 in parallel replication modethanks a lot On Thu, Jun 25, 2009 at 10:28 AM, Scott

Re: [GENERAL] horizontal sharding

2009-06-26 Thread mobiledreamers
can someone show how to setup pgpool 2 in parallel replication modethanks a lot On Thu, Jun 25, 2009 at 10:28 AM, Scott Marlowe scott.marl...@gmail.comwrote: On Thu, Jun 25, 2009 at 12:03 AM, mobiledream...@gmail.com wrote: GOals are to scale our game for 1 simultaneous connection to db

Re: [GENERAL] horizontal sharding

2009-06-26 Thread John R Pierce
mobiledream...@gmail.com wrote: can someone show how to setup pgpool 2 in parallel *query* mode ie horizontal partitioning did you look at http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel ? I'd pay close attention to the restrictions here, too...

Re: [GENERAL] horizontal sharding

2009-06-26 Thread mobiledreamers
Hey johnthanks i did read both extensively, but finishing all the steps parallel mode or horizontal partitioning mode doesnot work! but this is my conf file # backend_hostname, backend_port, backend_weight # here are examples backend_hostname0 = 'localhost' backend_port0 = 5432 backend_weight0

Re: [GENERAL] Explaining functions.

2009-06-26 Thread Greg Smith
On Tue, 23 Jun 2009, Hartman, Matthew wrote: Is there a recommended approach when trying to use EXPLAIN on a function? Specifically, a function that is more than the typical SELECT statement or tiny loop. The one in question that I'm hoping to optimize is around 250 lines. Take a look at

Re: [GENERAL] horizontal sharding

2009-06-26 Thread Scott Marlowe
I thought pgool II was abandonware... On Fri, Jun 26, 2009 at 7:50 PM, mobiledream...@gmail.com wrote: Hey john thanks i did read both extensively, but finishing all the steps parallel mode or horizontal partitioning mode doesnot work! but this is my conf file # backend_hostname,

Re: [GENERAL] horizontal sharding

2009-06-26 Thread Scott Marlowe
On Mon, Jun 15, 2009 at 11:36 AM, John R Piercepie...@hogranch.com wrote: Jim Mlodgenski wrote:    also is it possible to paritition without changing client code Yes, but it depends on the SQL in your client code. If you are just using simple SQL with no stored functions, you should be able