Re: [GENERAL] compiling postgresql 9.2.4 on fedora 17 64 bit takes very long time

2013-06-08 Thread c k
compilations too. Thanks for the help. On Fri, Jun 7, 2013 at 7:15 PM, Tom Lane wrote: > c k writes: > > Yesterday we configured a new server with Fedora 17 64 bit and updated > it's > > kernel to 3.8. I have to compile and install postgresql with python. So

[GENERAL] compiling postgresql 9.2.4 on fedora 17 64 bit takes very long time

2013-06-06 Thread c k
Hi, Yesterday we configured a new server with Fedora 17 64 bit and updated it's kernel to 3.8. I have to compile and install postgresql with python. So I executed commands ./configure --with-python make but make is running for last 16 hours and still not completed. It is showing same messages aga

Re: [GENERAL] finding if a period is multiples of a given interval

2013-01-30 Thread c k
Thanks. After some hacking it solved my problems using select date_part('days', age('06/01/2010'::date ,'04/01/2010'::date)); Regards, On Mon, Jan 28, 2013 at 9:32 PM, Adrian Klaver wrote: > On 01/28/2013 07:17 AM, c k wrote: > >> I know that. I

Re: [GENERAL] finding if a period is multiples of a given interval

2013-01-28 Thread c k
t 8:36 PM, Adrian Klaver wrote: > On 01/28/2013 05:24 AM, c k wrote: > > Hi, > > I have two variables in pl/pgsql function. > > p_fromdate and p_todate > > > > I have another variable which represents intervals like day, month, > > quarter etc. > > p_inte

[GENERAL] finding if a period is multiples of a given interval

2013-01-28 Thread c k
Hi, I have two variables in pl/pgsql function. p_fromdate and p_todate I have another variable which represents intervals like day, month, quarter etc. p_interval as smallint, to hold values like 1,2,3, which are substituted for intervals as '1 day', '1 month - 1 day', '3 months - 1 day' respecti

Re: [GENERAL] losing schema name in pg_dump

2012-05-20 Thread c k
I have two tables software.orders and software.products. I created two views. CREATE OR REPLACE VIEW software.o1 AS SELECT orders.orderid, orders.productid, orders.amount FROM software.orders; CREATE OR REPLACE VIEW software.o2 AS SELECT o1.orderid, o1.productid, o1.amount, products.productn

[GENERAL] losing schema name in pg_dump

2012-05-20 Thread c k
Hi all, Many times I have to dump all objects from a schema (single schema holding only functions and views) in plain text format. It is found that pg_dump includes a set search_path statement at the beginning and drops all occurrences of the schema name (to which dumped object belongs) from funct

Re: [GENERAL] suggestion for backup (pg_dump)

2012-05-20 Thread c k
for our software. Regards, C P Kulkarni On Sun, May 20, 2012 at 12:43 PM, Gabriele Bartolini < gabriele.bartol...@2ndquadrant.it> wrote: > Hi, > > Il 19/05/12 19:09, c k ha scritto: > > similar tasks and already using it. This problem arises when I have to >> issue an

[GENERAL] suggestion for backup

2012-05-19 Thread c k
Hi, In day to day work I need to dump objects of only specific types like functions, types, view etc from a schema. I know that it will be better to use separate schemas for similar tasks and already using it. This problem arises when I have to issue an update script to the client having only func

Re: [GENERAL] || versus concat( ), diff behavior

2012-03-04 Thread c k
I have found an another difference. select 'AA '::char(5) || 'AA'::char(5); result: "" while select 'AA '::varchar(5) || 'AA'::varchar(5); gives result: "AA AA" select 'AA '::text || 'AA'::text; gives result: "AA AA" what will be the reason for this? Regards, C P Kulkarni On

Re: [GENERAL] grouping of query data in xml

2012-01-21 Thread c k
It was not intentionally made, but was remaining due to copy-paste from other queries. It is only one occurrence of unnecessary casting. I got the idea about such a query from an oracle pl/sql book. C P Kulkarni On Sat, Jan 21, 2012 at 11:03 PM, Pavel Stehule wrote: > 2012/1/21 c k : > &g

Re: [GENERAL] grouping of query data in xml

2012-01-21 Thread c k
21, 2012 at 9:40 PM, Pavel Stehule wrote: > Hello > > there are others SQL/XML functions - with this function, you can > create xml like you need > > http://www.postgresql.org/docs/9.1/static/functions-xml.html > > Regards > > Pavel Stehule > > > 2012/1/

Re: [GENERAL] grouping of query data in xml

2012-01-21 Thread c k
I am testing the xml functions of PostgreSQL. On Sat, Jan 21, 2012 at 9:13 PM, David Johnston wrote: > *From:* pgsql-general-ow...@postgresql.org [mailto: > pgsql-general-ow...@postgresql.org] *On Behalf Of *c k > *Sent:* Saturday, January 21, 2012 10:23 AM > *To:* pgsql-admin; pgsql-ge

[GENERAL] grouping of query data in xml

2012-01-21 Thread c k
Hi friends, I am working with some xml exporting functionality of our application. I am testing query_to_xml function supported in PostgreSQL 9.1. XML output should be 1 COMPANY ACCOUNT 638168 1. 0. 638168 0. 1. but the output is as follows: a

Re: [GENERAL] [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
value2: ",value2) > > > can you please give me the example > I am not a python programmer. > > Nor am I! > Looks like your example, btw, is attempting string operations on something > not yet quite a string! > > Pythons are dangerous. Be careful! > > >

Re: [GENERAL] [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
when I modified the notice statement as plpy.notice('%s' %results[0]) it prints notice as NOTICE: {'func1': 'function return text'} I didn't understand why it is showing 'func1' in the results[0] ? C P Kulkarni On Sat, Dec 3, 2011 at 11:31

Re: [GENERAL] [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
python will only return the object > reference. > > Lou Picciano > > ------ > *From: *"c k" > *To: *"pgsql-admin" , > pgsql-general@postgresql.org > *Sent: *Saturday, December 3, 2011 12:50:16 PM > *Subject: *[ADMIN] return

[GENERAL] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
Hello friends, I am checking some logic which includes two functions. One is plsql function which returns text. Second function is plpythonu and contains one statement which outputs notice e.g. results = plpy.execute("select * from software.func1();") plpy.notice("%s" % col for col in results[0])

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-23 Thread c k
On Fri, Sep 23, 2011 at 3:43 PM, c k wrote: > As I have connected to postgres from MS Access, it thrown the error. > Now I have updated ODBC driver, still same problems comes for 9.1 and not > for 9.0. There should be some thing that has changed in 9.1 release which > prevents from a

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-23 Thread c k
rom package I have installed postgres 9.1 using EnterpriseDB one click installer. ODBC driver has version 9.0.3.10 Should I file a bug for this? Regards, C P Kulkarni On Thu, Sep 22, 2011 at 7:42 PM, Adrian Klaver wrote: > On Thursday, September 22, 2011 2:25:40 am c k wrote: > > It shows er

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-22 Thread c k
ype may be changed in 9.1. C P Kulkarni On Wed, Sep 21, 2011 at 7:05 PM, Adrian Klaver wrote: > On Wednesday, September 21, 2011 3:08:11 am c k wrote: > > Hello, > > > > I got a error yesterday while I have updated my development database to > 9.1 > > from 9.0.4. I bac

Re: [GENERAL] problem connecting postgresql 9.0 tables from vba

2011-09-21 Thread c k
why didn't you use Set TD = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect) CurrentDb.TableDefs.Append TD to link to a new table and then do your work. C P Kulkarni On Sun, Sep 18, 2011 at 4:32 AM, Craig Ringer wrote: > On 09/17/2011 03:51 PM,

[GENERAL] Date time value error in Ms Access using pass through queries

2011-09-21 Thread c k
Hello, I got a error yesterday while I have updated my development database to 9.1 from 9.0.4. I backed up my database from 9.0 and restored in 9.1. It well successfully. When running a query which calls a function, having date value as IN parameter, it gives me the error as date/time value out of

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread c k
Server and client both are a single machine. Chaitanya Kulkarni On Wed, Aug 24, 2011 at 10:47 PM, John R Pierce wrote: > On 08/24/11 10:06 AM, c k wrote: > >> I have added the python directory in the PATH. Another thing is I created >> another language plpython2u and succe

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread c k
No, I have added the python directory in the PATH. Another thing is I created another language plpython2u and succeeded. Still I will try to figure out the problem. Regards, Chaitanya Kulkarni On Wed, Aug 24, 2011 at 7:11 PM, Adrian Klaver wrote: > On Tuesday, August 23, 2011 11:10:19 pm

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-23 Thread c k
VOLATILE COST 100; What is the problem? Chaitany Kulkarni On Mon, Aug 22, 2011 at 8:08 PM, Adrian Klaver wrote: > On Monday, August 22, 2011 7:24:30 am c k wrote: > > No i didn't removed any thing. Only I have installed python 2.6. And then > > tried to create plpythonu

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-22 Thread c k
AM, Adrian Klaver wrote: > On Saturday, August 13, 2011 8:35:08 am c k wrote: > > I am not going to do stack trace right now, because I am using wireless > > broadband and is much costlier to download. > > But as other functions are working, may be it is related with other > t

Re: [GENERAL] [ADMIN] help in postgresql

2011-08-19 Thread c k
Just use postgresql wiki, postgresql documentation, and few sites who compare postgresql and oracle. Both are good database systems, postgresql is open source and free, runs on most platforms, easy to install and manage than oracle, supports very large database. Chaitany Kulkarni On Thu, Aug 18,

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-19 Thread c k
nfigured Talend but I m not able to understand how we can > get data synk to our DB servers. > Any views on that. > > c k wrote: > >> You can use Talend or Navicat for syncing the data as per your needs >> without much complexity in writing a data sync application. >> You

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread c k
You can use Talend or Navicat for syncing the data as per your needs without much complexity in writing a data sync application. You have to purchase license for navicat but you can talend for free and it also supports many other database systems. Chaitanya Kulkarni On Fri, Aug 19, 2011 at 10:18

Re: [GENERAL] Using Postgresql as application server

2011-08-16 Thread c k
In this war no one is looking at APEX from oracle. Oracle have implemented the whole webserver to DBMS gateway and web development and a web based business solutions in the database it self. They are using pl/sql for this. Many users are using it and found it stable and scalable. Important is that

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-16 Thread c k
I want to use the postgresql for exactly the same use. I want to keep my database separate and use another postgresql machine just as application server. Even for load balancing and scaling we can use many techniques mixed to get the work done. Chaitanya Kulkarni On Tue, Aug 16, 2011 at 11:55 PM,

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-14 Thread c k
Thanks for everyone. I will give reply after some experiments. Regards, Chaitanya Kulkarni On Sun, Aug 14, 2011 at 6:04 PM, wrote: > On Aug 14 2011, Uwe Schroeder wrote: > > >> >> > can u please give me it's link. >>> > I found ngx_postgres module. >>> > >> there is nginx_htttp_postgresql_

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-13 Thread c k
can u please give me it's link. I found ngx_postgres module. Chaitanya Kulkarni On Sun, Aug 14, 2011 at 12:14 AM, s...@bestmx.ru wrote: > c k wrote: > >> Yes, I know that I can not create a simple web application using only >> postgresql because we need a web server to

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-13 Thread c k
, concurrency etc are not the issues at this time. We have to adopt govt. rules and change the business logic accordingly and it must be fast enough to save penalties. Regards, Chaitanya Kulkarni On Sat, Aug 13, 2011 at 10:54 PM, s...@bestmx.ru wrote: > c k wrote: > > from last few mo

[GENERAL] Using Postgresql as application server

2011-08-13 Thread c k
Dear Postgres users, from last few months I am reading and searching for can postgresql used as application server? As postgresql supports many languages like pl/perl, pl/python etc, supports dblink like functions to connect to other postgresql servers and now features are in development to use ext

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-13 Thread c k
interpreter does not have any problems. So it seems that the problem is occurring due to crash in python package. Chaitanya Kulkarni On Thu, Aug 11, 2011 at 5:37 AM, Craig Ringer wrote: > On 11/08/2011 1:00 AM, c k wrote: > >> I have renamed uuid-ossp.dll to 0uuid-ossp.dll in post

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-10 Thread c k
lock is still in use 2011-08-10 22:27:58 IST HINT: Check if there are any old server processes still running, and terminate them. Is it related with python threads? Regards, Chaitanya Kulkarni On Wed, Aug 10, 2011 at 7:34 PM, Adrian Klaver wrote: > On Tuesday, August 09, 2011 10:13:17 pm c k

Re: [GENERAL] [ADMIN] postgresql server crash on windows 7 when using plpython

2011-08-10 Thread c k
ly, there is nothing about the problem. Chaitanya Kulkarni On Wed, Aug 10, 2011 at 12:07 PM, Craig Ringer wrote: > On 9/08/2011 10:54 PM, c k wrote: > > Normal python functions returning text etc. are working but when >> conatining >> >> import sys >> from uuid i

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-09 Thread c k
without any error. Chaitanya Kulkarni On Wed, Aug 10, 2011 at 12:57 AM, Adrian Klaver wrote: > > > On Tue, Aug 9, 2011 at 7:54 AM, c k wrote: > >> Dear Friends, >> For client requirements, I am testing postgresql 9.0.4 on windows 7 with >> plpython. First I installed py

[GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-09 Thread c k
Dear Friends, For client requirements, I am testing postgresql 9.0.4 on windows 7 with plpython. First I installed python 2.7 and then added python installation path to windows PATH variable. Then installed postgresql from one-click installer. Server started and every thing was ok. Then I go to cre

Re: [GENERAL] [ADMIN] Python UCS4 error

2011-07-05 Thread c k
. Regards, C P Kulkarni On Wed, Jul 6, 2011 at 9:25 AM, John R Pierce wrote: > On 07/05/11 8:33 PM, c k wrote: > >> yes, shipped with fedora 15 and binary installers are from EnterpriseDB - >> all in one. >> >> > any reason you didn't use the Fedora 15 native v

Re: [GENERAL] [ADMIN] Python UCS4 error

2011-07-05 Thread c k
yes, shipped with fedora 15 and binary installers are from EnterpriseDB - all in one. CPK On Wed, Jul 6, 2011 at 8:36 AM, John R Pierce wrote: > On 07/05/11 7:34 PM, c k wrote: > >> I have default python 2.7.1 installed along with fedora15. Then installed >> postgresql from

Re: [GENERAL] [ADMIN] Python UCS4 error

2011-07-05 Thread c k
ng on fedora 14 . It seems that I have to recompile and install python 2.7 at another location and use it for postgresql make process. But not sure that it will solve error. Thanks and regards, C P Kulkarni On Wed, Jul 6, 2011 at 12:24 AM, Tom Lane wrote: > c k writes: > > I updated

[GENERAL] Python UCS4 error

2011-07-05 Thread c k
Dear All, I updated my development machine with Fedora 15 and as there is python 2.7. I have also migrated my few postgresql databases. While creating plpython in one database, I got the following error undefined symbol PyUnicodeUCS4_AsEncodedString. Then I recompiled source code and got a plpython

Re: [GENERAL] plpython module import errors

2011-04-28 Thread c k
it. and it get solved. Thanks to all of you. Regards, CPKulkarni On Thu, Apr 28, 2011 at 9:57 PM, c k wrote: > Now, I found that python version postresql is using is 2.6 and path to it > is > "['/home/apy/rrun/build/activepython-svn-trunk/build/py2_6_4-l

Re: [GENERAL] plpython module import errors

2011-04-28 Thread c k
means? It seems that this path is of the python installation which is used to compile default plpython.so. If I will compile the source with python 2.7, and change the old plpython.so with new, will my problem solved? Thanks and regards, CPKulkarni On Thu, Apr 28, 2011 at 7:59 PM, Adrian Klaver

Re: [GENERAL] plpython module import errors

2011-04-28 Thread c k
Yes, there are three version (now). I am aware of only 2.7 installed by default in /usr/lib directory and 3.2 which I have installed externally. But the function given above shows version 2.6.4. Now the question is how to change the version postresql is calling for function execution? I have also c

[GENERAL] plpython module import errors

2011-04-28 Thread c k
Hello, I have installed postgresql 9 on fedora 14 having python 2.7. Now created plpythonu language in my database and created a simple function to calculate sum of two variables. while importing math libbrary and executing the function i got the error PL/Python: ImportError: No module named cmath

Re: [GENERAL] Asynchronous query execution

2010-12-11 Thread c k
thanks to all of you. Regards, CPK On 12/8/10, Merlin Moncure wrote: > On Wed, Dec 8, 2010 at 8:40 AM, John R Pierce wrote: >> On 12/08/10 5:35 AM, c k wrote: >>> >>> Hello, >>> I would like to know how can we execute the queries asynchronously? >>>

[GENERAL] Asynchronous query execution

2010-12-08 Thread c k
Hello, I would like to know how can we execute the queries asynchronously? If we use and execute plpgsql functions they just completes the execution or throws an error on error. In between next sql statement waits for the previous one to complete the execution. But in few situations it is required

Re: [GENERAL] plpyhton

2010-11-27 Thread c k
eva.learn...@gmail.com > > CC: pgsql-ad...@postgresql.org; pgsql-general@postgresql.org > > Subject: Re: [GENERAL] plpyhton > > > > > On Fri, Nov 26, 2010 at 05:28:52PM +0530, c k wrote: > > > Thanks for your reply. > > > But if a database has 100+ connection

Re: [GENERAL] plpyhton

2010-11-26 Thread c k
10 at 11:56:16AM +0530, c k wrote: > > Hello, > > Does calling a pl/python function from each database connection load the > > python interpreter each time? what are the effects of using pl/python > > function in a environment where no. of concurrent connections are more >

Re: [GENERAL] plpyhton

2010-11-23 Thread c k
Hello, Does calling a pl/python function from each database connection load the python interpreter each time? what are the effects of using pl/python function in a environment where no. of concurrent connections are more and each user calls a pl/python function? Please give the details about how p

[GENERAL] plpyhton

2010-11-23 Thread c k
Hello, Does calling a pl/python function from each database connection load the python interpreter each time? what are the effects of using pl/python function in a environment where no. of concurrent connections are more and each user calls a pl/python function? Please give the details about how p

Re: [GENERAL] getting list of columns from a query

2010-08-23 Thread c k
better if postgres has support for this. Thanks and regards to all, CPK On Mon, Aug 23, 2010 at 4:56 AM, Pavel Stehule wrote: > Hello > > 2010/8/22 c k : > > Hi all, > > As I am using MS Access for a long time, many tools like ms access > provides > > a way to get th

[GENERAL] getting list of columns from a query

2010-08-22 Thread c k
Hi all, As I am using MS Access for a long time, many tools like ms access provides a way to get the list of columns from a query. (using filed list in combo boxes in ms access). But is it possible to get such list of columns from a query where it is not known to the user, that which columns are de

[GENERAL] strange behavior of plpgsql function

2009-04-04 Thread c k
Hi all, I am facing a small but strange problem when using a plpgsql function as below. CREATE OR REPLACE FUNCTION fnvs.docrelatedassociatedetails(p_docid integer, p_addtype smallint, p_associateid integer, OUT docid integer, OUT associateid integer, OUT addressline1 varchar,OUT addressline2 varch

[GENERAL] Accessing large objects

2009-03-21 Thread c k
Hello, how to access large objects from the database when using PGAdmin like client applications? When a normal select is executed on lo type columns it gives only the number which refers to large objects stored in 'pg_largeobjects' table. When records from pg_largeobjects are fetched using select

Re: [GENERAL] different results for large objects

2009-03-17 Thread c k
17, 2009 at 6:13 PM, Tom Lane wrote: > c k writes: > > I am getting correct results with following query i.e. binary objects as > > they are inserted. > > > select docimages.* from docimages where docimages.accobjecttype=9 ORDER > BY > > docimages.docimagename; &g

[GENERAL] different results for large objects

2009-03-17 Thread c k
I am getting correct results with following query i.e. binary objects as they are inserted. select docimages.* from docimages where docimages.accobjecttype=9 ORDER BY docimages.docimagename; but when I created a function as follows, binary objects are not shown, rather a number represting the lar

[GENERAL] PERFORM

2009-02-22 Thread c k
Hello, I have a small problem following statement executes well do not give me proper results, rather subquery calleing another function is not executed at all. *perform sometable.pk, (select * from somefunction) from sometable where somecondition;* But* select * from somefunction;* and *perfor

[GENERAL] How to import/setup library functins

2009-02-21 Thread c k
When I installed postgres on windows using installer it gives me some options to include that library files or function OR to enable these features. but how can I setup these extra features on Linux when using rpm installers. I have tries to create such functions on linux pg, but it fails. These f

Re: [GENERAL] UPDATE

2009-02-19 Thread c k
Thanks to all replies. The main thing is that there was no index on the said column when I am updating and there are about 40+ other columns mostly of integer and smallint types. Also in MySQL I am using InnoDB tables. For both there is a single transaction when working, No other user is connected.

Re: [GENERAL] UPDATE

2009-02-19 Thread c k
1.5 GB RAM, Pentium dual core, single 80 GB disk, Windows XP sp3, PostgreSQL 8.3.6 a table is like following: -- Table: accgroups -- DROP TABLE accgroups; CREATE TABLE accgroups ( accgroupid serial NOT NULL, accgroupidname character varying(150) NOT NULL DEFAULT ''::character varying, accgr

[GENERAL] UPDATE

2009-02-19 Thread c k
I am using PG on windows for development. While testing some queries I found that updates are much slower as compared to other database systems. (On avarage MySQL updates 4-5 times faster than PG in a single unique index on primary key) Why? Another thing that I noticed is when any single column in

[GENERAL] Fail of a return query from plpgsql function for a specific table

2009-01-07 Thread c k
Hi all,I have a table accgroups and many others. I have written a test function as follows. CREATE OR REPLACE FUNCTION uf_testfunction() RETURNS SETOF associates AS $BODY$ begin return query select * from associates; return; end; $BODY$ LANGUAGE 'plpgsql' VOLATILE; This works fine for above tab

[GENERAL] logging SQL statements

2008-10-09 Thread c k
Is it possible to log all sql statements submitted to database server in a table in that database it self? This will be different from database logs which are written by db server. Regards, CPK

[GENERAL] secure connections

2008-09-07 Thread c k
Hello, I have a question regarding secure connections between pg clients and pg server. As per manual for 8.3 we can use openssl for this purpose. does odbc driver supports it and how? Is there any other method for this? Thanks CPK

Re: [GENERAL] [ADMIN] Auto recovery feature

2008-08-22 Thread c k
> > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *c k > *Sent:* Friday, August 22, 2008 11:02 AM > *To:* pgsql-general@postgresql.org; [EMAIL PROTECTED] > *Subject:* [ADMIN] Auto recovery feature > > > > Hello all, > As I know and have seen tha

[GENERAL] Auto recovery feature

2008-08-22 Thread c k
Hello all, As I know and have seen that innodb engine of MySQL does an auto-recovery when MySQL server is crashed or due to power failure. What is with postgreSQL? Does it makes an auto-recovery? and how? Thanks CPK

Re: [GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread c k
Thanks to all, I will try to use tsearch2 with some other index and then reply. Regards, CPK On Fri, Aug 22, 2008 at 5:01 PM, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Hi, > > c k wrote: > >> Hello all, >> As we are migrating our ERP application from MySQL

[GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread c k
Hello all, As we are migrating our ERP application from MySQL to PostgreSQL we have some difficulties. One of them is use of Like and Similar to operators. We often use LIKE to search a string from front-end without case sensetivity. As postgreSQL's LIKE is case sensitive, we tried ILIKE and SIMILA

Re: [GENERAL] [ADMIN] Query performance difference

2008-08-21 Thread c k
t;wrote: > It may be worth-wile to generate an explain plan > > > > http://www.postgresql.org/docs/8.3/interactive/sql-explain.html > > > > > > > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *c k > *Sent:* Thursd

[GENERAL] Query performance difference

2008-08-21 Thread c k
Hello, I have a question regarding query performance from two pgsql applications. PGadmin III 1.8 and Navicat for postgresql 8. Both connected to same server on local machine 8.3 and runs a same query for appox. 1,60,000 rows with one min, one max and addition of the min and max values on two table

[GENERAL] DELETE

2008-08-19 Thread c k
hello, what will be the error in syntax of following statement? delete from accountingtransactions where accountingtransactions.refaccdocid=docs.docid and docs.tmpselect=-1 and docs.tmpselectedby= $1; when a new function is created it does not gives any error but when this function is called from

[GENERAL] cache lookup failed

2008-08-19 Thread c k
I got following error while testing some newly created functions. ERROR: cache lookup failed for function 111462 CONTEXT: PL/pgSQL function "uf_postdoc" line 25 at FOR over SELECT rows ** Error ** ERROR: cache lookup failed for function 111462 SQL state: XX000 Context: PL/pgSQ

Re: [GENERAL] CASE

2008-08-19 Thread c k
Hi, I want to create a function as follows: case variable=value1 SQL statements case variable=value2 SQL statements case else end of case CPK On Tue, Aug 19, 2008 at 5:17 PM, Bill Moran <[EMAIL PROTECTED]>wrote: > In response to "c k" <[EMAIL PROTECTED]>: &

[GENERAL] CASE

2008-08-19 Thread c k
Is there any control structure statement similar to select case ... ? If yes how to use it. I have tried to use, case when then end, but not worked well as I want to use other control structures and sql statements to be executed for each case. Please reply. Thanks CPK.

[GENERAL] plpgsql functions

2008-08-15 Thread c k
Hi, I am getting an error for a function written in plpgsql, as - CREATE OR REPLACE FUNCTION uf_accgroupbal(date, date, p_company integer) RETURNS SETOF uf_closingbal AS $BODY$begin select accgroups."accgroupid", COALESCE(sum(osc),0) as obc, COALESCE(sum(osd),0) as obd, COALESCE(sum(csc),0) as s

[GENERAL] Fwd: setting datestyle

2008-08-11 Thread C K
Dear Friends, I have tried to set datestyle to 'DMY'. As per manual and many other posts related to this point, I have set datestyle to 'DMY' at database. but still it is needed to execute each time *set datestyle to 'DMY' *before starting any new connection. Once this is set, there is no problem f