[GENERAL] handling out parameter

2010-06-04 Thread Ravi Katkar
Hi , I have below function adf with inout, out parameter , CREATE OR REPLACE FUNCTION adf(inout voutvar integer , out vVar integer) AS $BODY$ BEGIN voutvar := 20; vvar := 10; RETURN; END; $BODY$ LANGUAGE 'plpgsql' After compiling I get below signature of function adf(integer) and return

Re: [GENERAL] so, does this overlap or not...? - fencepost question on overlaps()

2010-06-04 Thread Frank van Vugt
Hi Tom, > The rationale is "do what the SQL spec says" ;-) can't argue with the standard ;) > I seem to recall a previous discussion in the PG lists Good memory ! Adding 'sql standard' to the search options helped, this issue seems to elude people every now and then, given (amongst others):

Re: [GENERAL] handling out parameter

2010-06-04 Thread Pavel Stehule
Hello 2010/6/4 Ravi Katkar : > Hi , > > > > I have below function adf with inout, out parameter , > > > > CREATE OR REPLACE FUNCTION adf(inout voutvar integer , out vVar integer) > >  AS > > $BODY$ > > BEGIN > >   voutvar := 20; > >   vvar := 10; > > RETURN; > > END; $BODY$ > >   LANGUAGE 'plpgsql

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-04 Thread Alban Hertroys
> Thanks Greg, Alban and others, > > This has cleared up a misunderstanding I had about why one should reindex. > Re-reading the documentation > http://www.postgresql.org/docs/8.4/interactive/sql-reindex.html it is clear > now that reindex or recreating and index should not normally be needed

[GENERAL] please help me. I can't pg_dumg DB

2010-06-04 Thread peeratat tungsungnern
My HDD has bad sector and i can change new HDD. I have a ploblem can't back up database and display massage is: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: cache lookup failed for function 137832813 pg_dump: The command was: SELECT tableoid, oid, adnum, pg_cat

Re: [GENERAL] please help me. I can't pg_dumg DB

2010-06-04 Thread Bill Moran
In response to peeratat tungsungnern : > > My HDD has bad sector and i can change new HDD. I have a ploblem can't back > up database and display massage is: > > pg_dump: SQL command failed > pg_dump: Error message from server: ERROR: cache lookup failed for function > 137832813 > pg_dump: The

[GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Eliot Gable
In order to avoid using a 'FOR ... LOOP array_append(); END LOOP;' method of building an array (which is not at all efficient), I rewrote some of my code to do things more effectively. One of the steps involves building two arrays that are input to another stored procedure, but I am getting an erro

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Alban Hertroys
On 4 Jun 2010, at 15:37, Eliot Gable wrote: > CREATE OR REPLACE blah ... > ... > DECLARE > myvariable complex1[]; > mydatasource complex1; > myrowsource complex2[]; > ... > BEGIN > ... > -- The first way I tried to do it: > myvariable := array( > SELECT mydatasource FROM unnest(myrow

[GENERAL] How can I run an external program from a stored procedure?

2010-06-04 Thread Rob Richardson
Greetings! I'm running PostgreSQL 8.4 on MS Windows Server 2003. Assume I have a program named FlashLightAndSoundHorn.exe. In my database, there is a table that is read by some other program. Records in that table have a timestamp, so I can tell how long they've been waiting. I want a stored

Re: [GENERAL] How can I run an external program from a stored procedure?

2010-06-04 Thread Tom Lane
"Rob Richardson" writes: > Assume I have a program named FlashLightAndSoundHorn.exe. In my > database, there is a table that is read by some other program. Records > in that table have a timestamp, so I can tell how long they've been > waiting. I want a stored procedure that checks to see if a

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Tom Lane
Alban Hertroys writes: > I'm pretty sure you have a naming conflict. Yeah. Specifically, the given example looks like it would try to assign a null to the target variable, since it'd be taking the null value of a different variable instead of a value from the intended source. I believe the biza

[GENERAL] Connection's limit in SCO OpenServer 5.0.7 and pg 8.3.11 (no more than 94 connections)

2010-06-04 Thread erobles
Hello! I have postgres running on SCO OpenServer 5.0.7 and I've noticed that only accepts up to 94 connections, no more ... I modified the values in postgresql.conf max_connections from 100 to 128 shared_buffers from 24 to 48 MB postgres is started with: su - postgres -c "/usr/local/pgsql83/

Re: [GENERAL] How can I run an external program from a stored procedure?

2010-06-04 Thread Steve Atkins
On Jun 4, 2010, at 8:03 AM, Rob Richardson wrote: > Greetings! > > I'm running PostgreSQL 8.4 on MS Windows Server 2003. > > Assume I have a program named FlashLightAndSoundHorn.exe. In my database, > there is a table that is read by some other program. Records in that table > have a time

[GENERAL] Logging in as console crashes the database

2010-06-04 Thread Rob Richardson
We have a customer who is running PostgreSQL 8.4 on a Windows Server 2003 box. The Postgres service is set up to store data on the computer's H drive, which is actually an iSCSI connection to a folder of a disk drive on a separate computer. The same computer that runs PostgreSQL also runs the Kep

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Eliot Gable
Thanks for the note on the bugfix in the update. I will try it. However, there is no naming conflict. The idea was this: The select query should return one result row for each row in the FROM clause since there is no WHERE clause. Each result row should be the contents of the complex1 data type co

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Tom Lane
Eliot Gable writes: > Thanks for the note on the bugfix in the update. I will try it. However, > there is no naming conflict. There was most certainly a naming conflict in the sample code you posted. I realize that that probably was not the code you were actually trying to use, but we can only g

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-04 Thread raghavendra t
Thank you Very Much Steve. On Thu, Jun 3, 2010 at 6:10 AM, Steve Crawford < scrawf...@pinpointresearch.com> wrote: > On 06/02/2010 03:29 PM, raghavendra t wrote: > >> ... >> >> Suppose am at the server-end, how could i get the client-time. Its really >> troublesome when compared with the timezone

Re: [GENERAL] Connection's limit in SCO OpenServer 5.0.7 and pg 8.3.11 (no more than 94 connections)

2010-06-04 Thread Filip Rembiałkowski
1. What kind of error you get when client tries to establish 95th connection? 2. Did you try to consult sco expert? The problem seems to be not caused by postgres... 2010/6/4, erobles : > Hello! I have postgres running on SCO OpenServer 5.0.7 > > and I've noticed that only accepts up to 94 connect

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Eliot Gable
This is the code I posted: create type complex1 as ( ... ); -- one integer member and about 16 text members create type complex2 as ( ... ); -- few integer members, about 10 text members, and about 6 different enum members CREATE OR REPLACE blah ... ... DECLARE myvariable complex1[]; mydataso

Re: [GENERAL] Logging in as console crashes the database

2010-06-04 Thread John R Pierce
Rob Richardson wrote: We have a customer who is running PostgreSQL 8.4 on a Windows Server 2003 box. The Postgres service is set up to store data on the computer's H drive, which is actually an iSCSI connection to a folder of a disk drive on a separate computer. The same computer that runs P

[GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread DM
Hi All, We want to replicate /move data form db2 to postgres is there any software / solutions / approach available to do this? Thanks Deepak

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread Richard Broersma
On Fri, Jun 4, 2010 at 2:13 PM, DM wrote: > We want to replicate /move data form db2 to postgres is there any software / > solutions / approach available to do this? Here is a link on the postgresql wiki. Hopefully it has some useful information. http://wiki.postgresql.org/wiki/Converting_from

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread DM
Thanks Robert, Is there any tools available. Thanks Deepak On Fri, Jun 4, 2010 at 2:19 PM, Richard Broersma wrote: > On Fri, Jun 4, 2010 at 2:13 PM, DM wrote: > > We want to replicate /move data form db2 to postgres is there any > software / > > solutions / approach available to do this? > >

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread John R Pierce
DM wrote: Hi All, We want to replicate /move data form db2 to postgres is there any software / solutions / approach available to do this? in general, I'd likely use a perl or similar program to connect to the 'other' database, fetch your data, and insert it into your postgres database. thi

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread DM
Sorry i didnt frame my question properly earlier, we are looking for solution to do real time replication from db2 to postgres, its different from migration. Eventually we want to move away from DB2. Intention is to create a subset of a db2 database on postgres and allow users to access the postgre

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Alvaro Herrera
Excerpts from Eliot Gable's message of vie jun 04 16:13:28 -0400 2010: > This is the code I posted: > > create type complex1 as ( ... ); -- one integer member and about 16 text > members > create type complex2 as ( ... ); -- few integer members, about 10 text > members, and about 6 different enum

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread David Fetter
Deepak, You can use DBI-Link to make writeable views of tables in DB2 (or other data store) from PostgreSQL. You can use the same linkage to materialize those views, if you like. The latest version of the software is on GitHub http://github.com/davidfetter/DBI-Link You can also join the low-tr

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread John R Pierce
DM wrote: Sorry i didnt frame my question properly earlier, we are looking for solution to do real time replication from db2 to postgres, its different from migration. Eventually we want to move away from DB2. Intention is to create a subset of a db2 database on postgres and allow users to acc

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread DM
Thank you so much for every ones inputs. It is not real time, updates every 5 mins should be fine. But the DB2 database is real busy and its real performance based. Thanks Deepak On Fri, Jun 4, 2010 at 2:49 PM, John R Pierce wrote: > DM wrote: > >> Sorry i didnt frame my question properly earl

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread John R Pierce
DM wrote: Thank you so much for every ones inputs. It is not real time, updates every 5 mins should be fine. But the DB2 database is real busy and its real performance based. well, you might look over http://www.redbooks.ibm.com/abstracts/sg246828.html which discusses DB2 replication. "

Re: [GENERAL] Move data from DB2 to Postgres any software/solutions/approach?

2010-06-04 Thread DM
Thank you so much for all your inputs. On Fri, Jun 4, 2010 at 3:27 PM, John R Pierce wrote: > DM wrote: > >> Thank you so much for every ones inputs. >> >> It is not real time, updates every 5 mins should be fine. But the DB2 >> database is real busy and its real performance based. >> > > well,

[GENERAL] Null comparisons and the transform_null_equals run-time parameter

2010-06-04 Thread Ken Winter
When the run-time parameter transform_null_equals is on, shouldn't two variables with NULL values evaluate as equal? They don't seem to. At the bottom of this message is a little test function. It tries all comparisons of NULL-valued variables and NULL constants, both before and after turni

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Eliot Gable
Updating did solve the problem. Thanks. On Fri, Jun 4, 2010 at 11:23 AM, Tom Lane wrote: > Alban Hertroys writes: > > I'm pretty sure you have a naming conflict. > > Yeah. Specifically, the given example looks like it would try to assign > a null to the target variable, since it'd be taking th

[GENERAL] parsing geometric operators

2010-06-04 Thread Konstantin Izmailov
I'm creating my own parser/regex combination for fast and lightweight Postgres queries processing (in a user app). So I wanted to double check some details in PG source, but could not find the geometric operators ( http://www.postgresql.org/docs/8.4/static/functions-geometry.html) definition/rules

[GENERAL] Postgres 8.4 segfaults on CentOS 5.5 (using EnterpriseDB installers)

2010-06-04 Thread Aleksey Tsalolikhin
Hi. We've been running PostgreSQL 8.4.2 on CentOS 5.4 (64-bit), installed with the EnterpriseDB installer. This has been excellent. Now we have our first CentOS 5.5 server (64-bit) and I installed PostgreSQL 8.4.4 using the EnterpriseDB installer, and it is unable to start the database ins

[GENERAL] ERROR: character 0x90 of encoding "WIN1252" has no equivalent in "UTF8"

2010-06-04 Thread Wang, Mary Y
Hi, I'm getting this error from postgres " ERROR: character 0x90 of encoding "WIN1252" has no equivalent in "UTF8" " and from a dump file when I tried to use psql command to restore the dump. I have SET client_encoding = 'win1252' in the dump file. Any ideas? Thanks Mary -- Sent via p

Re: [GENERAL] Logging in as console crashes the database

2010-06-04 Thread Craig Ringer
On 05/06/10 01:02, Rob Richardson wrote: > We have a customer who is running PostgreSQL 8.4 on a Windows Server > 2003 box. The Postgres service is set up to store data on the > computer's H drive, which is actually an iSCSI connection to a folder of > a disk drive on a separate computer. The sam

Re: [GENERAL] parsing geometric operators

2010-06-04 Thread Konstantin Izmailov
Please ignore my question. I found "Op" tokens definition in scan.l! On Fri, Jun 4, 2010 at 6:15 PM, Konstantin Izmailov wrote: > I'm creating my own parser/regex combination for fast and lightweight > Postgres queries processing (in a user app). So I wanted to double check > some details in PG s