Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Rich Shepard
On Sun, 27 Jul 2008, Andrej Ricnik-Bay wrote: I thought we had established that this issue was caused by the current instance pointing at the old installs data directory? No, that wasn't the problem. If I use 'postgres -D /var/lib/pgsql/data ' the postmaster starts correctly and

Re: [GENERAL] procedure to load xml file data in postgesql

2008-07-27 Thread Stephane Bortzmeyer
On Sat, Jul 26, 2008 at 02:32:05PM -0700, aravind chandu [EMAIL PROTECTED] wrote a message of 149 lines which said: I have to load xml file data into postgresql database table using a stored procedure,but I didn't have any idea how to start it. Well, the

[GENERAL] Getting data from Xml to Postgresql database

2008-07-27 Thread aravind chandu
Hi, I have some data in XML format and i need to upload in postgresql database using stored procedure. Can someone tell me the step by step procedure of the same as i will be doing it for the first time. Thank You, Avin.

[GENERAL] How to get the real postgreql error from visual basic

2008-07-27 Thread dfx
Dear Sirs, when I execute a function that returns an error, visual basic shows always the same error code ( -214767259) but I would like to know the real postgres code of the error. The visual basic code that I use is the following: Dim Cmd As new ADODB.Command Cmd.CommandText = delete from

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Andrej Ricnik-Bay
2008/7/28 Rich Shepard [EMAIL PROTECTED]: Thank you. I think that for some reason using pg_ctl to start the postmaster is no longer working here. As I have time, I'll look into why. Can you do a 'locate pg_ctl|xargs ls -l' and see whether you have more than one installed, and if so, which one

[GENERAL] Profiling postgres

2008-07-27 Thread Suresh
Hello, I want to profile some functions in postgres using gprof. I am following this procedure listed in nabble forum. # cd postgres/bin #  cd .../src/backend #  make clean #  make PROFILE=-pg all How to proceed after this ? I am not getting the gmon.out file. How do I run

Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Rich Shepard
On Mon, 28 Jul 2008, Andrej Ricnik-Bay wrote: Can you do a 'locate pg_ctl|xargs ls -l' and see whether you have more than one installed, and if so, which one comes first in the PATH? Andrej, There are two: -rwxr-xr-x 1 root root 24320 2008-06-17 16:18 /usr/bin/pg_ctl -rw-r--r-- 1 root

Re: [GENERAL] Substitute a variable in PL/PGSQL.

2008-07-27 Thread Steve Martin
Roberts, Jon wrote: What I am trying to do is find the difference between two tables, one that stores the information in a single column, and the other which stores the same data in multiple columns. E.g. CREATE TABLE test(col1 text, col2 text, col3 text, col4 text, col5 text,

Re: [GENERAL] Substitute a variable in PL/PGSQL.

2008-07-27 Thread Steve Martin
Klint Gore wrote: Steve Martin wrote: I am trying to create a PL/PGSQL function to return the values of the fields in a record, e.g. 1 value per row in the output of the function. How do you substitute a variable? CREATE OR REPLACE FUNCTION testfunc() RETURNS SETOF text AS $$ DECLARE

Re: [GENERAL] Substitute a variable in PL/PGSQL.

2008-07-27 Thread Steve Martin
[EMAIL PROTECTED] wrote: You can do it in straight sql like so. SELECT (array[col1, col2, col3, col4, col5, col6, col7, col8, col9, col10])[i] FROM test t, generate_series(1,10) i Art Hi Art, Thanks for the advice, in my case using arrays was not a option as the data could be null.

Re: [GENERAL] Profiling postgres

2008-07-27 Thread Sushant Sinha
configure postgres with the following options 1. ./configure --enable-profiling 2. make and make install 3. start psql and issue the query 4. gmon.out will be in the data directory once you exit from psql -Sushant. On Sun, 2008-07-27 at 05:55 -0700, Suresh wrote: Hello, I want to profile

[GENERAL] copy ... from stdin csv; and bytea

2008-07-27 Thread David Wilson
My application is adding a bytea column to a table into which data is dumped in approximately 4k row batches, one batch approximately every 10 seconds. To this point, those dumps have used copy from stdin; however, I'm having some difficulty getting bytea encodings to work with it. Specifically, I

Re: [GENERAL] Getting data from Xml to Postgresql database

2008-07-27 Thread Craig Ringer
aravind chandu wrote: Hi, I have some data in XML format and i need to upload in postgresql database using stored procedure. Can someone tell me the step by step procedure of the same as i will be doing it for the first time. As Stephanie Bortzmeyer already explained to you, there is

Re: [GENERAL] copy ... from stdin csv; and bytea

2008-07-27 Thread Klint Gore
David Wilson wrote: My application is adding a bytea column to a table into which data is dumped in approximately 4k row batches, one batch approximately every 10 seconds. To this point, those dumps have used copy from stdin; however, I'm having some difficulty getting bytea encodings to work

Re: [GENERAL] copy ... from stdin csv; and bytea

2008-07-27 Thread David Wilson
On Mon, Jul 28, 2008 at 1:24 AM, Klint Gore [EMAIL PROTECTED] wrote: Try just a single \ e.g. ge.xls,application/vnd.ms-excel,71168,\320\317\021\340\241[snip] Thanks- I did try that, and it at least gave the expected output from select, but is there a way to verify that it's actually handling