[GENERAL] Stored Procs Vs User Defined Functions vis-a-vis UDF's in Postgresql

2007-10-27 Thread Harpreet Dhaliwal
Hi, lately I have been looking at difference between a Stored Proc and User Defined Functions in other RDBMS like Sql Server / Oracle. However, in postgresql, I think Stored Procs are wrapped around in User Defined functions, if I am not wrong. The following is the list of main differences b/w a

Re: [GENERAL] SLEEP in posgresql

2007-10-14 Thread Harpreet Dhaliwal
I think pg_sleep is not implemented in 8.1 and earlier versions. Is there any alternative if someone is using versions before 8.2 ? On 10/9/07, Guy Rouillier [EMAIL PROTECTED] wrote: Jasbinder Singh Bali wrote: Hi, I have a while loop and I want to re-iterate after every 't' seconds. I

[GENERAL] Embedding code in Postgres source code

2007-10-07 Thread Harpreet Dhaliwal
Hi, I have a stored procedure that gets called every now and then in my system. This stored procedure is an implementation of client socket code basically. If somehow this stored procedure becomes a part of Postgres source code, would it really make any difference as far as performance and

Re: [GENERAL] Embedding code in Postgres source code

2007-10-07 Thread Harpreet Dhaliwal
time, but you can load any library with statement LOAD. Regards Pavel Stehule 2007/10/7, Harpreet Dhaliwal [EMAIL PROTECTED]: Hi, I have a stored procedure that gets called every now and then in my system. This stored procedure is an implementation of client socket code basically

Re: [GENERAL] Embedding code in Postgres source code

2007-10-07 Thread Harpreet Dhaliwal
Faster by calling external or internal libraries. my concept was calling libraries internal to the system would make it faster right ? On 10/7/07, Pavel Stehule [EMAIL PROTECTED] wrote: 2007/10/7, Harpreet Dhaliwal [EMAIL PROTECTED]: My stored procedure is in Perl. Does that really make any

Re: [GENERAL] Transactional DDL

2007-08-19 Thread Harpreet Dhaliwal
So is there really any version control mechanism of functions in postgresql or not ? ~Harpreet On 8/18/07, Ron Mayer [EMAIL PROTECTED] wrote: Scott Marlowe wrote: On 8/14/07, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Hi, I read a few lines about SP compilation in postgres http

Re: [GENERAL] Transactional DDL

2007-08-15 Thread Harpreet Dhaliwal
On 8/15/07, Scott Marlowe [EMAIL PROTECTED] wrote: On 8/14/07, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: So you mean to say DDL statements can't be put in one single transaction in Oracle ? You can put them in, but then they will cause the previous DMK to be silently committed

[GENERAL] Transactional DDL

2007-08-14 Thread Harpreet Dhaliwal
Hi, I read a few lines about SP compilation in postgres http://searchoracle.techtarget.com/originalContent/0,289142,sid41_gci1179016,00.html *1. stored procedure compilation is transactional. * *You can recompile a stored procedure on a live system, and only transactions starting after that

Re: [GENERAL] Transactional DDL

2007-08-14 Thread Harpreet Dhaliwal
So you mean to say DDL statements can't be put in one single transaction in Oracle ? On 8/15/07, Scott Marlowe [EMAIL PROTECTED] wrote: On 8/14/07, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Hi, I read a few lines about SP compilation in postgres http://searchoracle.techtarget.com

Re: [GENERAL] Transactional DDL

2007-08-14 Thread Harpreet Dhaliwal
And this feature i.e. transactional DDL is not there in other major RDBMS like sql server, oracle etc? thanks ~Harpreet On 8/15/07, Tom Lane [EMAIL PROTECTED] wrote: Harpreet Dhaliwal [EMAIL PROTECTED] writes: I read a few lines about SP compilation in postgres http

[GENERAL] Performance check of my database

2007-08-12 Thread Harpreet Dhaliwal
Hi, Lately I completed the business logic of my application and all related database work. Now i need to check the performance of my database, how much load it can bear, perfomance to different queries and stored procedures. Basically i need to do the performance testing of my database and

Re: [GENERAL] Duplicate Unique Key constraint error

2007-07-12 Thread Harpreet Dhaliwal
How can one rollover a sequence back to zero after you delete records from a table with one such sequence. I see it starting with the last value of the sequence inserted. On 7/11/07, Tom Allison [EMAIL PROTECTED] wrote: On Jul 10, 2007, at 3:09 PM, Tom Lane wrote: Harpreet Dhaliwal [EMAIL

Re: [GENERAL] Duplicate Unique Key constraint error

2007-07-10 Thread Harpreet Dhaliwal
my primary key is neither SERIAL nor a SEQUENCE. CONSTRAINT pk_dig PRIMARY KEY (dig_id) This is the clause that I have for my primary key in the create table script. thanks, ~Harpreet On 7/10/07, Ron St-Pierre [EMAIL PROTECTED] wrote: Harpreet Dhaliwal wrote: Hi, I keep getting

Re: [GENERAL] Duplicate Unique Key constraint error

2007-07-10 Thread Harpreet Dhaliwal
Server and never faced this problem there. Please guide me throug to get rid of this problem. Thanks, ~Harpreet On 7/10/07, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: my primary key is neither SERIAL nor a SEQUENCE. CONSTRAINT pk_dig PRIMARY KEY (dig_id) This is the clause that I have for my

Re: [GENERAL] Duplicate Unique Key constraint error

2007-07-10 Thread Harpreet Dhaliwal
Thanks alot for all your suggestions gentlemen. I changed it to a SERIAL column and all the pain has been automatically alleviated :) Thanks a ton. ~Harpreet On 7/10/07, Tom Lane [EMAIL PROTECTED] wrote: Harpreet Dhaliwal [EMAIL PROTECTED] writes: Transaction 1 started, saw max(dig_id) = 30

[GENERAL] Duplicate Unique Key constraint error

2007-07-09 Thread Harpreet Dhaliwal
Hi, I keep getting this duplicate unique key constraint error for my primary key even though I'm not inserting anything duplicate. It even inserts the records properly but my console throws this error that I'm sure of what it is all about. Corruption of my Primary Key can be one of the

[GENERAL] Capturing return value of a function in Pl/Perl

2007-07-06 Thread Harpreet Dhaliwal
Hi, I'm calling a plpgsql function in a plperl function. plpgsql function is a simple select query returning a single row of records. How can i retrieve the values of different fields in my plperl function? If i write something like my $query = SELECT sp_select; my $exec =

[GENERAL] writing debug output in perl

2007-06-22 Thread Harpreet Dhaliwal
Hi, Can anyone help me out with funciton(s) to write a debug output in a perl function on postgres. Thanks, ~Harpreet

[GENERAL] Stored Procedures and Functions

2007-06-02 Thread Harpreet Dhaliwal
Hi, Is it true that postgres doesn't have a notion of Stored Procedures and functions is what it has instead? RDBMS like Sql Server supports both stored procedures and functions. So I was wondering what is the difference between a Stored Procedure and a function. Thanks, ~Harpreet

Re: [GENERAL] Transactional DDL

2007-06-02 Thread Harpreet Dhaliwal
Whats so novel about postgresql here? This would happen in any RDBMS. right? You induced divide by zero exception that crashed the whole transaction and it did not create the table bar? I can't see any Transactional DDL philosophy here. Could you please throw some more light on it to point out

Re: [GENERAL] Transactional DDL

2007-06-02 Thread Harpreet Dhaliwal
So, while writing any technical document, would it be wrong to mention stored procedures in postgresql? what is the general convention? On 6/2/07, Dawid Kuroczko [EMAIL PROTECTED] wrote: On 6/2/07, Jasbinder Singh Bali [EMAIL PROTECTED] wrote: But its said that transactions in any RDBMS

Re: [GENERAL] Transactional DDL

2007-06-02 Thread Harpreet Dhaliwal
On 6/2/07, Jasbinder Singh Bali [EMAIL PROTECTED] wrote: On 6/2/07, Michael Glaesemann [EMAIL PROTECTED] wrote: On Jun 2, 2007, at 11:08 , Harpreet Dhaliwal wrote: Whats so novel about postgresql here? This would happen in any RDBMS. right? You induced divide by zero exception

Re: [GENERAL] Transactional DDL

2007-06-02 Thread Harpreet Dhaliwal
my bad.. i replied to that in a wrong thread. sorry On 6/2/07, Leif B. Kristensen [EMAIL PROTECTED] wrote: On Saturday 2. June 2007 20:39, Ron Johnson wrote: You were politely asked not to top-post. On 06/02/07 11:46, Harpreet Dhaliwal wrote: So, while writing any technical document, would

Re: [GENERAL] why postgresql over other RDBMS

2007-05-26 Thread Harpreet Dhaliwal
is the host base configuration methodology in postgres superior to other RDBMS. is this something novel that postgres has come up with? ~Harpreet On 5/26/07, Tom Lane [EMAIL PROTECTED] wrote: Stefan Kaltenbrunner [EMAIL PROTECTED] writes: Tom Lane wrote: A more interesting question is what

[GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Harpreet Dhaliwal
Hi, I was wondering if Vacuum DB concept in Postgres is really novel and there's no concept like this in other RDBMS like oracle or sql server. If at all other RDBMS have such a concept implemented, how good or bad it is as compared to postgres's vacuum db concept. Any type of pointers would be

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Harpreet Dhaliwal
I was just wondering if Vacuum Db in postgresql is somehow superior to the ones that we have in other RDBMS. On 5/23/07, Alexander Staubo [EMAIL PROTECTED] wrote: On 5/23/07, Dann Corbit [EMAIL PROTECTED] wrote: In SQL*Server it is called UPDATE STATISTICS

[GENERAL] replace function in a query

2007-05-21 Thread Harpreet Dhaliwal
Hi, I have to write a query that does the following. select column_x from tbl_xyz where column_y = 'abc def ghi' new line characters i.e. '\n' in column_y should be replaced with a space character i.e. ' ' in this query. Is there any replace function that when used in the query with colulmn_y

Re: [GENERAL] Database transaction related

2007-05-14 Thread Harpreet Dhaliwal
Thanks alot john. that was helpful On 5/14/07, John D. Burger [EMAIL PROTECTED] wrote: Jasbinder Singh Bali wrote: could you please elaborate this concept of queue table? The basic idea is to for the insert trigger to not explicitly kick off the work you need to have done, but simply insert

[GENERAL] Printing values on pgadmin tool window using plperlu

2007-05-13 Thread Harpreet Dhaliwal
Hi I have a function written in language plpelu. Normally, values in perl code are printed using print statement. Then same when used in postgres environment won't print messages in 'Messages' tab to pgadmin query tool window. How and where can I print these values while running the plperlu

[GENERAL] SQL Transaction related

2007-05-10 Thread Harpreet Dhaliwal
Hi, I have a transaction like following: BEGIN INSERT INTO tbl_xyz VALUES (val1, val2); SELECT INTO wid MAX(val1) FROM tbl_xyz; END; My question is in the SELECT INTO statement, will I get the value of val1 from the INSERT INTO in the same transaction even though the transaction has

[GENERAL] printing variable values in pl/pgsql functions

2007-05-08 Thread Harpreet Dhaliwal
Hi, I have a pl/pgsql in which i have to print various variable values during the execution of the function to see what values are getting populated inside those variables with due course of time. PRINT variable name doesn't work. Can anyone tell me how to print these values?? Thanks,

[GENERAL] printing variable values in pl/pgsql functions

2007-05-08 Thread Harpreet Dhaliwal
Hi, I have a pl/pgsql in which i have to print various variable values during the execution of the function to see what values are getting populated inside those variables with due course of time. PRINT variable name doesn't work. Can anyone tell me how to print these values?? Thanks,

[GENERAL] Postgres (selection of thesis topic)

2007-05-02 Thread Harpreet Dhaliwal
Hi, I'm kind of new to postgresql and the project that I'm working on currently deals with parsing emails, storing parsed components in postgresql DB and fire triggers on certain inserts that opens socket connection with a unix tools server, initiates tools like whois, traceroute etc and unix

Re: [GENERAL] IF function?

2007-05-01 Thread Harpreet Dhaliwal
IF ( condition here) -- to do ELSE -- to END IF On 5/1/07, novnov [EMAIL PROTECTED] wrote: Does postgresql have a built in IF function that allows one to eval a condition and return one or another value? Like: IIF(mybooleanfield = true, It's true, It's not true) -- View this message in

[GENERAL] No of triggers of one single table

2007-04-06 Thread Harpreet Dhaliwal
Hi, Can i have more than one trigger on one single table. Actually I want 2 different events to take place simultaneously and independently after insert. ~Harpreet.

[GENERAL] reindexing keys in postgres

2007-04-06 Thread Harpreet Dhaliwal
Hi, Lately i was searching for a way I could reindex all my keys. Primary Keys in particular. Really didn't find any manual that could guide me through. Reason i wanted to reindex my PK is that whenever i insert a record in the table, even though that record is unique, i get an error saying

[GENERAL] introduction of FK results in no data insert

2007-03-31 Thread Harpreet Dhaliwal
Hi, Upto the point when i don't have FKs in my database, things work fine. As soon as i put FK in all the tables referencing to a field of one single table, nothing is inserted. Is it an indexing issue? Can anyone throw some light on this? ~Harpreet

[GENERAL] some ports closed in Fedora

2007-02-03 Thread Harpreet Dhaliwal
Hi, though this is not directly related to postgres, but i was wondering why are most of the ports seen closed when one does nmap scan of these ports. Whats reason can we attribute to the fact that most of the ports in an OS are in closed state. Thanks, Harpreet

Re: [GENERAL] some ports closed in Fedora

2007-02-03 Thread Harpreet Dhaliwal
Also, wanted to know how to prevent remote root ftp login in fedora. On 2/3/07, Andreas Kretschmer [EMAIL PROTECTED] wrote: Harpreet Dhaliwal [EMAIL PROTECTED] schrieb: Hi, though this is not directly related to postgres, but i was wondering why are most of the ports seen closed when one

Re: [GENERAL] some ports closed in Fedora

2007-02-03 Thread Harpreet Dhaliwal
Is there any fedora mailinglist? Never knew if there was one On 2/3/07, A. Kretschmer [EMAIL PROTECTED] wrote: am Sat, dem 03.02.2007, um 9:49:46 -0500 mailte Harpreet Dhaliwal folgendes: Also, wanted to know how to prevent remote root ftp login in fedora. 1. configure your ftp-server

Re: [GENERAL] some ports closed in Fedora

2007-02-03 Thread Harpreet Dhaliwal
lol On 2/3/07, Andreas Kretschmer [EMAIL PROTECTED] wrote: Harpreet Dhaliwal [EMAIL PROTECTED] schrieb: Is there any fedora mailinglist? Never knew if there was one Yes, more then one, ask google. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely

Re: [GENERAL] Defining and Using variables in a postgres function

2007-02-02 Thread Harpreet Dhaliwal
commits. Also, should i go with a table level lock or a row level lock in this scenario? Thanks ~Harpreet On 2/2/07, Alban Hertroys [EMAIL PROTECTED] wrote: Harpreet Dhaliwal wrote: I have a function like the follwoing: CREATE OR REPLACE FUNCTION sp_insert_raw_email(bool, text, text, text

[GENERAL] Defining and Using variables in a postgres function

2007-02-01 Thread Harpreet Dhaliwal
I have a function like the follwoing: CREATE OR REPLACE FUNCTION sp_insert_raw_email(bool, text, text, text, int4,text,text,text,text,text,text,text,timestamp) RETURNS void AS $BODY$ BEGIN -- SELECT STATEMENT GOES HERE-- INSERT INTO tbl_email(option_public, agency , id) VALUES ($1,$2) ; END;

[GENERAL] Firing triggers based on certain Insert conditions

2007-01-28 Thread Harpreet Dhaliwal
Hi I have a table in which i have a field named 'source' A trigger is written on this table. I want this trigger to fire only when after Insert this field 'source' has value = 'from', otherwise trigger should not be fired at all. Just wondering if its really possible? Thanks in advance. Harpreet

Re: [GENERAL] Firing triggers based on certain Insert conditions

2007-01-28 Thread Harpreet Dhaliwal
anyways. Harpreet On 1/28/07, Tom Lane [EMAIL PROTECTED] wrote: Harpreet Dhaliwal [EMAIL PROTECTED] writes: I want this trigger to fire only when after Insert this field 'source' has value = 'from', otherwise trigger should not be fired at all. Just wondering if its really possible

Re: [GENERAL] PostgreSQL data loss

2007-01-28 Thread Harpreet Dhaliwal
While making POC (proof of concept) for any project, we clearly mention at the end of the document that loss of data is not going to be our responsibility and thats how we guys save our ass right in the begening. What happened with you has happened with us many a times but our bold and italicized

Re: [GENERAL] Dynamic loading of Perl Code in Postgres functions

2007-01-18 Thread Harpreet Dhaliwal
this thing be done? Thanks, Jas On 1/16/07, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: so my syntax is correct? just wondering if there's some fundamental mistake in it ~Harpreet On 1/16/07, Tom Lane [EMAIL PROTECTED] wrote: Harpreet Dhaliwal [EMAIL PROTECTED] writes: I was just

Re: [GENERAL] Dynamic loading of Perl Code in Postgres functions

2007-01-16 Thread Harpreet Dhaliwal
I was just wondering if one could use something like this CREATE FUNCTION *funcname* (*argument-types*) RETURNS *return-type* AS $$ require abc.pl $$ LANGUAGE plperl; To include abc.pl here, how is the path of abc.pl specified. Also, just wondering if the structure of above function is

Re: [GENERAL] Dynamic loading of Perl Code in Postgres functions

2007-01-16 Thread Harpreet Dhaliwal
so my syntax is correct? just wondering if there's some fundamental mistake in it ~Harpreet On 1/16/07, Tom Lane [EMAIL PROTECTED] wrote: Harpreet Dhaliwal [EMAIL PROTECTED] writes: I was just wondering if one could use something like this CREATE FUNCTION *funcname* (*argument-types

Re: [GENERAL] NEED URGENT HELP....

2006-12-25 Thread Harpreet Dhaliwal
select * from sp_get_phase ('sandip', 'oms', '1,4') this return a Blank record it would match ur query against '1,4' for the corressponding field in the table. do u really have one such value for that field in your table, i mean '1,4' ?? it won't search for 1 and 4 separately if that is what you

Re: [GENERAL] why not kill -9 postmaster

2006-10-22 Thread Harpreet Dhaliwal
what type of start up script are you talking about here? On 10/21/06, Tom Lane [EMAIL PROTECTED] wrote: Ian Harding [EMAIL PROTECTED] writes: On 10/20/06, Tom Lane [EMAIL PROTECTED] wrote: Personally I think the TIP that's really needed is never remove postmaster.pid by hand. When the machine

[GENERAL] why not kill -9 postmaster

2006-10-20 Thread Harpreet Dhaliwal
Its always said that don't kill -9 postmaster. Whats the reason not to do it. Why is it so strictly prohibited? Thanks, ~Harpreet.

Re: Can't get ECPG to connect (was Re: [GENERAL] Urgen help required)

2006-10-20 Thread Harpreet Dhaliwal
Jas, you might need to check the uplink and downlink time of your network router. Also,check the postgresql.conf file to see various timeouts there. Comment all the timeouts to set them to infinity so that your Unix tools server keeps trying connecting to the Postgres server. Also, check if you

Re: [GENERAL] why not kill -9 postmaster

2006-10-20 Thread Harpreet Dhaliwal
After all that discussion that took place while i was sleeping, I have a few more questions simply haunting me.Someitmes, rather most of the times, when I start postgres using pg_ctl, it says antoher postmaster is running. Being a total naive about the hazzards of kill -9 postmaster, i simply used

[GENERAL] difference b/w text and varchar datatypes

2006-10-16 Thread Harpreet Dhaliwal
Hi,Just wanted to know how would it make a difference if i use text datatype instead of varchar.Thanks,~Harpreet

Re: [GENERAL] difference b/w text and varchar datatypes

2006-10-16 Thread Harpreet Dhaliwal
can you please provide me the link for the same.thanksOn 10/16/06, Bruce Momjian [EMAIL PROTECTED] wrote: Harpreet Dhaliwal wrote: Hi, Just wanted to know how would it make a difference if i use text datatype instead of varchar.See FAQ item.--Bruce Momjian [EMAIL PROTECTED]EnterpriseDBhttp

[GENERAL] function for current date-time

2006-10-16 Thread Harpreet Dhaliwal
Hi,I have a timestamp field in my table and want to set a default value of current date/time for it.What should i enter as its default value? is there any function like now() in postgres?Thanks,~Harpreet

[GENERAL] calling two shared objects in one single function call

2006-10-16 Thread Harpreet Dhaliwal
Hi,Can two different shared objects be loaded one after the other in the same function so that the second one starts its execution right after the first one finishes.~Harpreet

[GENERAL] Server Added Y'day. Missing Today

2006-10-13 Thread Harpreet Dhaliwal
Hi,Yesterday I configured a postgres server using Pgadmin3, restored the database from a backup.Today when i come and check my pgadmin, i can't see any server added there.Kind of confused.Can anyone please let me know whats happeneing here and what should i do to see the server that I added

[GENERAL] Trigger (Transaction related)

2006-09-01 Thread Harpreet Dhaliwal
Hi,I've written a trigger after insert on a table (parser) and the trigger calls a function that dynamically loads a shared object written in C.This shared object intends to use the newly inserted row in the table on which trigger is written and insert values in another table, something like this,

Re: [GENERAL] Trigger (Transaction related)

2006-09-01 Thread Harpreet Dhaliwal
: On Fri, Sep 01, 2006 at 02:51:59AM -0400, Harpreet Dhaliwal wrote: Hi, I've written a trigger after insert on a table (parser) and the trigger calls a function that dynamically loads a shared object written in C. This shared object intends to use the newly inserted row in the table on which trigger

Re: [GENERAL] Trigger (Transaction related)

2006-09-01 Thread Harpreet Dhaliwal
Thats OK, but my question is why did the original insert not take place. Syntax error was in the select query that is fired as a result of the triggerThanks,~Harpreet On 9/1/06, Roman Neuhauser [EMAIL PROTECTED] wrote: # [EMAIL PROTECTED] / 2006-09-01 03:19:03 -0400: If that is the case then why

Re: [GENERAL] Trigger (Transaction related)

2006-09-01 Thread Harpreet Dhaliwal
Exactly Tom,I was missing a few paranthesis like a nut.Thanks for pointing out.Thanks and regards~HarpreetOn 9/1/06, Tom Lane [EMAIL PROTECTED] wrote:Harpreet Dhaliwal [EMAIL PROTECTED] writes: sprintf(buffer, INSERT INTO headers (id, header_content) VALUES ( %d, SELECT contents FROM parser

[GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Hi,I'm trying to use SPI for database connectivity at the server side.My database is intialized at /usr/local/pgsql/hpsspi.h is at the follwoing location/usr/include/pgsql/server/executor. I have a C file that has the SPI code and is located at /usr/local/pgsql/hpsI thin file i do #include

Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
wrote: On Wed, Aug 30, 2006 at 02:16:36AM -0400, Harpreet Dhaliwal wrote: Hi, I'm trying to use SPI for database connectivity at the server side.snip This throws hell lot of errors (hundreds of them), even if i don't have any SPI code in my C file as of now. Can anyone please tell me whats going

Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Can you please email me your spi.h. Need to see the path of other header files that spi.h includes and compare it with what i have.~HarpreetOn 8/30/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Now i did something like this$ cat a.c#include executor/spi.h$ gcc -I /usr/include/pgsql/server -c a.c

Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
ago.If i don't copy these files to /usr/include and let them be where they are i.e /usr/include/pgsql/serverthen it says, file /executor/spi.h not found.don't know what is this mess all about. Thanks,~HarpreetOn 8/30/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Hi,Please find attached the error

Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Harpreet Dhaliwal
No, you can't.You need postgres user for sure.Postgresql database doesn't run on root account.~HarpreetOn 8/30/06, Fredrik Israelsson [EMAIL PROTECTED] wrote: Hi!I am about to install PostgreSQL on a minimal Linux system, where rootis the only user that is allowed to exist. I would prefer to use

Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Also,a.c is at/usr/local/pgsql/hpsand sp.h is at/usr/include/pgsql/server/executorDoes that make a difference?Regards,~harpreetOn 8/30/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Also, Where should the directoriresexecutor, nodes, utils, access, catalog be? Over here, its searching it in /usr

Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Also, Can you please email me ur directory structure, as in, absolute path of a.c and absolute path of spi.h.Thanks,~HarpreetOn 8/30/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Also,a.c is at/usr/local/pgsql/hpsand sp.h is at/usr/include/pgsql/server/executorDoes that make a difference?Regards

Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
, Harpreet Dhaliwal wrote: Also, Can you please email me ur directory structure, as in, absolute path of a.cand absolute path of spi.h.The absolute path of a.c is the irrelevent, it's in the currentdirectory. executor/spi.h is in /usr/include/postgresql/server.BTW, in your sample output you have -l

Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
kleptog@svana.org wrote:On Wed, Aug 30, 2006 at 04:14:20AM -0400, Harpreet Dhaliwal wrote: Did not understand about capital L and small L. What should i be using, capital or small.Please use a font that distinguishes between I and l. It's capital Ilike in INDIGO. Not an L at all... I also tried gcc -I

Re: [GENERAL] Perl language creation failed

2006-08-28 Thread Harpreet Dhaliwal
I tried to install postgresql-plperl-8.1package.It asks for a few dependencies.i did yum install of those dependencies but says nothing to doCan you tell me whats wrong with it? Thanks,~Harpreet.On 8/28/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: I'm fedora core 5 user with PG 8.1 On 8/28/06

Re: [GENERAL] Perl language creation failed

2006-08-28 Thread Harpreet Dhaliwal
Can anyone give me the right path for downlaod postgresql-plperl package for fedora core 5 (32 bit) postgresql version 8.1.4.The one that i found closest to the needs is not working. Tried a few more but all of them throw the same problem. What would be the most authentic source?

Re: [GENERAL] Perl language creation failed

2006-08-28 Thread Harpreet Dhaliwal
I didsudo yum install postgresql-plperl*and it says dependency perl-base = 2:5.8.8 is missing.I did yum install perl-base = 2:5.8.8 and its says nothing to doTried sudo yum install perl-base = 2:5.8.8 and says nothing doEven tried yum install perl-base* and still says nothing to doDon't know

Re: [GENERAL] Perl language creation failed

2006-08-28 Thread Harpreet Dhaliwal
Exactly. Sorry for being so careless. Was thinking something else after being bugged up.Done now. Thanks alot,~HarpreetOn 8/28/06, Jorge Godoy [EMAIL PROTECTED] wrote:Harpreet Dhaliwal [EMAIL PROTECTED] writes: I did sudo yum install postgresql-plperl* and it says dependency perl-base = 2:5.8.8

[GENERAL] Perl language creation failed

2006-08-27 Thread Harpreet Dhaliwal
Hi,I'm trying the followingCREATE LANGUAGE plperlbefore executing my functions written in perlbut get the follwing errorERROR: could not access file $libdir/plperl: No such file or directory Can anyone tell me how to fix this?Thanks~Harpreet

[GENERAL] Passing arguments to a trigger function

2006-08-22 Thread Harpreet Dhaliwal
Hi,Can anyone give me pointers for how to pass arguments to a trigger function.I think it is done using tg_argv or something but not very sure how to do it.Regards,Harpreet

Re: [GENERAL] Trigger (Calling a Procedure)

2006-08-16 Thread Harpreet Dhaliwal
I got your point. however, my requirement is something like this. The trigger shold start another function (a stored procedure) after any event is fired. how do I accomplish this goal? Harpreet On 8/16/06, Michael Fuhr [EMAIL PROTECTED] wrote: On Wed, Aug 16, 2006 at 01:35:47AM -0400, Harpreet

Re: [NOVICE] [GENERAL] DB insert Error

2006-08-16 Thread Harpreet Dhaliwal
Its actually something like the trigger should start a C function after insert and the C function has the ECPG code for some more inserts. Itssimilar tothe way we dynamically load a shared library while executing a stored procedure, as in , executing a fucntion in C file using stored procedure/

Re: [GENERAL] Trigger (Calling a Procedure)

2006-08-16 Thread Harpreet Dhaliwal
/ function. Harpreet On 8/16/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: I got your point. however, my requirement is something like this. The trigger shold start another function (a stored procedure) after any event is fired. how do I accomplish this goal? Harpreet On 8/16/06, Michael Fuhr

Re: [NOVICE] [GENERAL] DB insert Error

2006-08-16 Thread Harpreet Dhaliwal
Forgot to write that that was my question. I mean can we call a stored procedure as an action of a trigger? On 8/16/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Its actually something like the trigger should start a C function after insert and the C function has the ECPG code for some more

[GENERAL] Triggers invoking a stored procedure or a C function

2006-08-16 Thread Harpreet Dhaliwal
Hi, Conventionally a trigger would fire a few sql queries on a particular event and we have standard code for that. My requirement is to start a stored procedure or a C function as a trigger action. Is this possible? Thanks, ~Harpreet

Re: [NOVICE] [GENERAL] DB insert Error

2006-08-16 Thread Harpreet Dhaliwal
Also, I think you should check the special characters in the text that you are trying to store. I realize from one of your emails that when u run the same query using the PGAdmin query tool, only a part of the the varchar gets stores and rest it trimmed. This has something to do with the special

Re: [GENERAL] Connection string

2006-08-15 Thread Harpreet Dhaliwal
:07:11PM -0400, Harpreet Dhaliwal wrote: Problem was with pg_hba.conf file ECPGdebug(1, stderr); showed that in pg_hba.conf there was setting for localhost only and not for other ip addresses. I had to change the configuration for IPV4 local connections It should have been something like hostall all

Re: [GENERAL] Connection string

2006-08-15 Thread Harpreet Dhaliwal
in my previous mail both the ip addressed should be read as 192.168.0.123thanksharpreetOn 8/15/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote:Hi Micheal,sudde2nly a problem has cropped up in my connection. Its kind of strange.ECPGdegug(1, stderr) says[9852]: connect: cold not open database

Re: [GENERAL] Connection string

2006-08-15 Thread Harpreet Dhaliwal
Its doneservice iptables stop did the trickfirewall was running on my DB serverforgot to stop itThanks~HarpreetOn 8/15/06, Michael Fuhr [EMAIL PROTECTED] wrote:On Sun, Aug 13, 2006 at 10:30:24AM +0200, Michael Meskes wrote: On Fri, Aug 11, 2006 at 04:40:36PM -0600, Michael Fuhr wrote: Will you

[GENERAL] Trigger (Calling a Procedure)

2006-08-15 Thread Harpreet Dhaliwal
Hi,I'm trying to create a trigger with the following definition:CREATE TRIGGER insert_price_change AFTER INSERT OR DELETE OR UPDATE ON raw_email FOR EACH ROW EXECUTE PROCEDURE add_one(1);Procedure / Function add_one has the following definition CREATE FUNCTION add_one(integer) RETURNS integer AS

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Also,-402 sqlcode means connection attempt to the database did not succeeddoes this mean that my application is connecting to the database server but somehow failing in connecting to the database dbxyz due to some authentication problems??? ~HarpreetOn 8/13/06, Harpreet Dhaliwal [EMAIL PROTECTED

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
i started the postmaster using pg_ctl in user a/c jsb.Switched to root and ran nmap -sS localhostfor port 5432 it says5432/tcp opne postgresOn 8/13/06, Richard Broersma Jr [EMAIL PROTECTED] wrote: --- Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Hello, I'm really not able to connect to my database

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
What do i do next buddy?~harpreetOn 8/13/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote:i started the postmaster using pg_ctl in user a/c jsb.Switched to root and ran nmap -sS localhost for port 5432 it says5432/tcp opne postgresOn 8/13/06, Richard Broersma Jr [EMAIL PROTECTED] wrote

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Postgres is not installed in the client computer. When i try to connect to the postgres db from the computer in which postgres is installed, it goes through. No hassles in that. Problem comes up when I'm trying to connect to the same database from a different computer in which no postgres is

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Hi Richard,I'm attaching pg_hba.conf and postgresql.conf files as you had asked for.Don't know if I've missed anything in these two configuration files that would not let my client machine to connect to the DB computer. Also, what exactly do u want me to install on the client computer? A full

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
ECPGdebug(1, stderr);After including this line of code in my program, it says:raising sqlcode -402 in line 14, 'could not connect to database dbxyz in line 14'Thanks,~Harpreet. On 8/13/06, Michael Fuhr [EMAIL PROTECTED] wrote: On Sun, Aug 13, 2006 at 01:58:54AM -0400, Harpreet Dhaliwal wrote: -402

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Fuhr [EMAIL PROTECTED] wrote: On Sun, Aug 13, 2006 at 01:58:54AM -0400, Harpreet Dhaliwal wrote: -402 sqlcode means connection attempt to the database did not succeed does this mean that my application is connecting to the database server but somehow failing in connecting to the database dbxyz due

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Thanks alot all.You guys have been really helpful.I've crossed the first obstacle, a major one though...Phew.Let me see where do I trip later :-)~HarpreetOn 8/13/06, Richard Broersma Jr [EMAIL PROTECTED] wrote: Postgres is not installed in the client computer. When i try to connect to the

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
, 2006 at 07:07:11PM -0400, Harpreet Dhaliwal wrote: Problem was with pg_hba.conf file ECPGdebug(1, stderr); showed that in pg_hba.conf there was setting for localhost only and not for other ip addresses. I had to change the configuration for IPV4 local connections It should have been something like

Re: [GENERAL] Connection string

2006-08-12 Thread Harpreet Dhaliwal
What kind of patch are you talking about? On 8/11/06, Michael Fuhr [EMAIL PROTECTED] wrote: On Fri, Aug 11, 2006 at 06:09:16PM +0200, Michael Meskes wrote: On Fri, Aug 11, 2006 at 07:01:55AM -0600, Michael Fuhr wrote: The ECPG Connecting to the Database Server documentation does have an example

Re: [GENERAL] Connection Object

2006-08-12 Thread Harpreet Dhaliwal
http://www.postgresql.org/docs/8.1/interactive/ecpg-errors.html#AEN27672 printf(Error code is %d,SQLCODE) I hope this helps On 8/12/06, Sandeep Kumar Jakkaraju [EMAIL PROTECTED] wrote: Hi All I want to know specifically from the exception thrown by the connection object when the connnection

Re: [GENERAL] Connection string

2006-08-12 Thread Harpreet Dhaliwal
: On Fri, Aug 11, 2006 at 11:40:53PM -0400, Harpreet Dhaliwal wrote: What kind of patch are you talking about?A documentation patch.Michael Meskes, to whom I was responding,maintains ECPG.I was asking whether he wanted me to submit a patch to fix misleading parts of the documentation or whether he'd

  1   2   >