[SQL] schema proxying virtual database

2009-09-13 Thread Rajesh Kumar Mallah
[ sorry if it is a repost, i am not sure if i am subscribed in -general ] Dear List, There are many opensource applications that support postgresql (eg , gforge , bricolage , dspam ..) but does not use schemas(namespaces) as a result of which you are forced to use/create a new database and loose

Re: [SQL] Must I use DISTINCT?

2009-02-05 Thread Rajesh Kumar Mallah
have you tried Join using , eg SELECT e.eid, e.name FROM entry e join access a ON( e.eid = 120 AND (e.ownid = 66 OR e.aid = a.aid) ) ; some sample data might also help in understanding the prob more clrearly. regds rajesh kumar mallah. On Fri, Feb 6, 2009 at 3:27 AM, Michael B Allen

Re: [SQL] (possible) bug with constraint exclusion

2008-01-12 Thread Rajesh Kumar Mallah
On Jan 12, 2008 10:54 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > > Am I correct in understanding that the current behavior is inappropriate > > and shall be corrected at some point of time in future versions ?

Re: [SQL] (possible) bug with constraint exclusion

2008-01-11 Thread Rajesh Kumar Mallah
On Jan 12, 2008 1:26 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > > looks like constraint exclusion is being too aggressive in excluding null > > values > > Hmm, you're right. Looks like I broke

Re: [SQL] (possible) bug with constraint exclusion

2008-01-10 Thread Rajesh Kumar Mallah
Update the phenomenon does not exists in 8.2.0 but exists in 8.2.5. On Jan 11, 2008 12:28 PM, Rajesh Kumar Mallah <[EMAIL PROTECTED]> wrote: > Hi , > > looks like constraint exclusion is being too aggressive in excluding null > values > although its well known that check

[SQL] (possible) bug with constraint exclusion

2008-01-10 Thread Rajesh Kumar Mallah
Hi , looks like constraint exclusion is being too aggressive in excluding null values although its well known that check constraints apply on not null values only. Hope the minimal test session below explains the problem we facing. BTW: we are very impressed with the performance gains we achieved

Re: [SQL] Track query status

2007-03-29 Thread Rajesh Kumar Mallah
more methods: 1. select * from pg_stat_activity; see what all running and pid of your current query also. 2. SELECT h.pid AS blocker, w.pid AS blockee FROM ONLY pg_locks h, ONLY pg_locks w WHERE h."granted" AND NOT w."granted" AND (h.relation = w.relation AND h."database" = w."database" OR h.

Re: [SQL] Empty Table

2007-03-29 Thread Rajesh Kumar Mallah
>I dont think i clearly understand your requirement. > >Are you wanting to restore the "PLAIN" backup of a database >with a different database name ? > Yes Are you getting any particular error? what platform are you in ? >what do you mean "deleting information of current database ..." > Clear

Re: [SQL] Empty Table

2007-03-29 Thread Rajesh Kumar Mallah
se (the database I used to make the backup). I think that's why pgAdmin does not work with plain backups on Restore. What does occurs with the information schema when I restore from one database with a name to other with another name ? Regards Ezequias Em Thu, 29 Mar 2007 23:46:31 +0530

Re: [SQL] Empty Table

2007-03-29 Thread Rajesh Kumar Mallah
psql> TRUNCATE TABLE ; if you have too many tables , generate the above commands by using a query on tables information schema table. hope it helps. On 3/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi list, I have many tables with many constraints and I would like to empty all my table

Re: [SQL] selecting random row values in postgres

2007-02-23 Thread Rajesh Kumar Mallah
L PROTECTED]> wrote: > > Thanks Buddy, really appreciate ur help on this > > problem solved... > > Is there any way this query can be optimized...i'm running it on a huge > table with joins > > - Sumeet > > > On 2/23/07, Rajesh Kumar Mallah <[E

Re: [SQL] selecting random row values in postgres

2007-02-23 Thread Rajesh Kumar Mallah
On 2/24/07, Sumeet <[EMAIL PROTECTED]> wrote: Hi all, I'm trying to write a query to select random values from a set of 'GROUP BY' see the scenario below to understand the problem here (the actual problem cannot be discussed here so i'm taking an example scenario) Assume there is a table

[SQL] ordering of selected rows from an ordered subselect

2007-02-17 Thread Rajesh Kumar Mallah
Hi, we know that rows in a table are not stored in any particular order and explicit order by clause is required to get data in any particular order. but does it apply to select queries from ordered subselects also ? eg select id , name , expensive_func(name) from ( select id , name f

Re: [SQL] subquery abnormal behavior

2006-12-10 Thread Rajesh Kumar Mallah
On 12/11/06, Shoaib Mir <[EMAIL PROTECTED]> wrote: I just noticed an abnormal behavior for the subquery: create table myt1 (a numeric); create table myt2 (b numeric); select a from myt1 where a in (select a from myt2); This should be giving an error that column 'a' does not exist in myt2 b

Re: [SQL] Proper way of iterating over the column names in a trigger function. [ SOLVED]

2006-12-06 Thread Rajesh Kumar Mallah
On 12/6/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > what is the proper way for iterating over column names of a table using > SPI_* functions. You need to pay attention to the attisdropped field of the TupleDesc entri

[SQL] Proper way of iterating over the column names in a trigger function.

2006-12-06 Thread Rajesh Kumar Mallah
Hi, I am trying to interate over column names of a table on which a C trigger function is called on UPDATE/DELETE and INSERT. SPI function char * SPI_fname(TupleDesc rowdesc, int colnumber) is being used. looks like the function is returning column names like "pg.dropped.2" for d

Re: [SQL] calling elog possibly causing problem in DirectFunctionCall1

2006-12-01 Thread Rajesh Kumar Mallah
On 12/1/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > data->time_stamp = > DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); This code is incorrect, as timestamptz_in takes three argument

Re: [SQL] calling elog possibly causing problem in DirectFunctionCall1

2006-12-01 Thread Rajesh Kumar Mallah
On 12/1/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > data->time_stamp = > DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); This code is incorrect, as timestamptz_in takes three arguments

[SQL] calling elog possibly causing problem in DirectFunctionCall1

2006-12-01 Thread Rajesh Kumar Mallah
Hi , In certain C trigger function following code snippet causes ERROR: --- elog (NOTICE , "before calling DirectFunctionCall1"); data->time_stamp = DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); elog (NOTICE , "after calling Direct

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
On 11/19/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > In our webapps, we use the same username to connect to the database > for all kind of updates. Hence we are not able to makeout whoo modified > what . Howev

Re: [SQL] Random()

2006-11-18 Thread Rajesh Kumar Mallah
On 11/18/06, A. Kretschmer <[EMAIL PROTECTED]> wrote: am Sat, dem 18.11.2006, um 23:02:33 +0530 mailte Rajesh Kumar Mallah folgendes: > >select from order by random() limit 1; > > This query will tend to get slower as the table grows because of the > sorting. Right. &

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
On 11/18/06, Volkan YAZICI <[EMAIL PROTECTED]> wrote: Hi, On Nov 18 06:00, Rajesh Kumar Mallah wrote: > Is there any way to set a variable from a web application (using > dbi/perl , libpq etc), and access the same variable from a C trigger > inside a transaction ? Why don't

Re: [SQL] Random()

2006-11-18 Thread Rajesh Kumar Mallah
On 11/17/06, A. Kretschmer <[EMAIL PROTECTED]> wrote: am Thu, dem 16.11.2006, um 16:31:14 -0200 mailte Ezequias Rodrigues da Rocha folgendes: > Hi list, > > I have a bigint collumn and I would like to generate a random number within the > numbers of my column. select from order by random()

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
hi, We do not want to modify our apps for doing auditing. we are considering table level auditing auditrail http://gborg.postgresql.org/project/audittrail/projdisplay.php seems to be doing a good job. i just need to access the "username" that starts the transaction in webapp from the trigger in a

[SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
Hi , Is there any way to set a variable from a web application (using dbi/perl , libpq etc), and access the same variable from a C trigger inside a transaction ? the %_SHARED hash available in plperl provides only session level isolation and does not suit the requirement. Original problem: we

Re: [SQL] converting epoch to timestamp

2005-10-27 Thread Rajesh Kumar Mallah
On 10/26/05, Richard Huxton wrote: > Rajesh Kumar Mallah wrote: > > Hi, > > > > Can anyone tell me how to convert epoch to timestamp ? > > > > ie reverse of : > > > > SELECT EXTRACT( epoch FROM now() ); > > I'd start with either Googl

[SQL] converting epoch to timestamp

2005-10-26 Thread Rajesh Kumar Mallah
Hi, Can anyone tell me how to convert epoch to timestamp ? ie reverse of : SELECT EXTRACT( epoch FROM now() ); +--+ |date_part | +--+ | 1130317518.61997 | +--+ (1 row) Regds mallah. ---(end of broadcast)--

Re: [SQL] Issue with UPDATE statement on v8

2005-09-22 Thread Rajesh Kumar Mallah
On 9/23/05, Kenneth Hutchinson <[EMAIL PROTECTED]> wrote: > Hello, > > I'm sorry if this has been sent to the community multiple times. I am > not able to determine whether my posts have gotten through. If you have > rec'd this multiple times, please let me know. > > We have recently migrated to

Re: [SQL] Help with a view

2005-09-22 Thread Rajesh Kumar Mallah
> Basically, what I've got is the first person and the tag_type. I can do > it with a function from PHP: > > function get_spouses($p) { > $handle = pg_query("select person from principals >where event in (select event from principals >where person

Re: [SQL] partial index on non default tablespace syntax

2005-06-18 Thread Rajesh Kumar Mallah
Fuhr,Tom and Everyone Extremely sorry for not consulting the docs. I was doing this: CREATE INDEX foo_name_idx ON foo (name) WHERE name IS NOT NULL TABLESPACE testspace ; Regds Rajesh Kumar Mallah. On 6/18/05, Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Sat, Jun 18, 2005 at 10:24:0

[SQL] partial index on non default tablespace syntax

2005-06-18 Thread Rajesh Kumar Mallah
the TODO Regds Rajesh Kumar Mallah. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [SQL] plpgsql dynamic record access

2005-06-08 Thread Rajesh Kumar Mallah
Ganesh, Did you have a look at example Example 35-2. A PL/pgSQL http://www.postgresql.org/docs/current/static/plpgsql-trigger.html Regds maLLAH ---(end of broadcast)--- TIP 8: explain analyze is your friend

[SQL] Tsearch2 headline usage

2005-06-04 Thread Rajesh Kumar Mallah
Hi There, We are using tsearch2 for FTS implementation. For highlighting the search term in the result we are displaying the output of headline function which is supposed to tag (mark up) those stemmed words in the text that match any of the stemmed words in search term. The problem is that some

Re: [SQL] Significance of Database Encoding

2005-05-15 Thread Rajesh Mallah
)) > break > except UnicodeError: > pass > else: > print "No suitable encoding for line..." This may not work . Becuase ,conversion to utf-8 can be successfull (no runtime error) even for an incorre

Re: [SQL] Significance of Database Encoding

2005-05-15 Thread Rajesh Mallah
accomplised reliably. Also my database may contain data in multiple encodings like WINDOWS-1251 and WINDOWS-1256 in various places as data has been inserted by different peoples using different sources and client software. Regds Rajesh Kumar Mallah. > Using SQL ASCII to sto

Re: [SQL] Significance of Database Encoding [ update ]

2005-05-15 Thread Rajesh Mallah
I am not sure why the characters did not display properly in the mailling list archives. http://archives.postgresql.org/pgsql-sql/2005-05/msg00102.php but when i do the select in my screen (xterm -u8) i do see the japanese glyphs properly. Regds Mallah. --- Rajesh Mallah <[EM

[SQL] Significance of Database Encoding

2005-05-15 Thread Rajesh Mallah
migrating databases from SQL_ASCII to UNICODE, given the above observation what significance does a migration have. Regards Rajesh Kumar Mallah. __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http

Re: [SQL] Arbitrary precision arithmatic with pgsql

2004-08-31 Thread Rajesh Kumar Mallah
aesemann grzm myrealbox com !DSPAM:4134745e87571738116768! -- regds Mallah. Rajesh Kumar Mallah +---+ | Tradeindia.com (3,11,246) Registered Users | | Indias' Leading B2B eMarketPlace

Re: [SQL] Arbitrary precision arithmatic with pgsql

2004-08-31 Thread Rajesh Kumar Mallah
Michael Glaesemann wrote: On Aug 31, 2004, at 8:55 PM, Rajesh Kumar Mallah wrote: The docs says that numeric type supports numbers upto any precision However tradein_clients=# SELECT cast(2^100 as numeric); 1. Does the specs not require pgsql to print a warning or info , will it not be

[SQL] Arbitrary precision arithmatic with pgsql

2004-08-31 Thread Rajesh Kumar Mallah
any way to do such calculation using pgsql, i understand bc is a better tool for it. Warm Regards Rajesh Kumar Mallah. -- regds Mallah. Rajesh Kumar Mallah +---+ | Tradeindia.com (3,11,246) Registered Users | | Indias' Leading B2B eMarket

Re: [SQL] Comparing tsearch2 vectors.

2004-07-12 Thread Rajesh Kumar Mallah
Achilleus Mantzios wrote: O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 2004 : Achilleus Mantzios wrote: O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 2004 : Dear Mantzios, I have to get set of banners from database in response to a search term. I want that the search term

Re: [SQL] Secure DB Systems - How to

2004-07-12 Thread Rajesh Kumar Mallah
---(end of broadcast)--- TIP 8: explain analyze is your friend -- regds Mallah. Rajesh Kumar Mallah +---+ | Tradeindia.com (3,11,246) Registered Users | | Indias' Leading B2B eMarketPlace | |

Re: [SQL] Comparing tsearch2 vectors.

2004-07-12 Thread Rajesh Kumar Mallah
Achilleus Mantzios wrote: O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 2004 : Dear Mantzios, I have to get set of banners from database in response to a search term. I want that the search term be compared to the keyword corresponding to the banners stored in database. current i am doing

Re: [SQL] Comparing tsearch2 vectors.

2004-07-12 Thread Rajesh Kumar Mallah
and keywords). So that the banners for the adword say 'incense exporter' is shown even if 'incenses exporter' or 'incense exporters' is searched. I hope i am able to clarify. Regds Mallah. Achilleus Mantzios wrote: O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 20

[SQL] Comparing tsearch2 vectors.

2004-07-12 Thread Rajesh Kumar Mallah
rator matches the given name and argument type(s). You may need to add explicit type casts. tradein_clients=# -- regds Mallah. Rajesh Kumar Mallah +---+ | Tradeindia.com (3,11,246) Registered Users | |

Re: [SQL] Problem in Stored Procedures

2004-07-10 Thread Rajesh Kumar Mallah
With Best Regards Pradeep Kumar P J ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org -- regds Mallah. Rajesh Kumar Mallah +

Re: [SQL] Query becoming slower on adding a primary key [ SOLVED

2004-06-10 Thread Rajesh Kumar Mallah
HI, The problem was solved by reducing the effective_cache_size from 102400 to 10240 my total RAM is 4GB. Regds mallah. Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) j

Re: [SQL] Query becoming slower on adding a primary key

2004-06-08 Thread Rajesh Kumar Mallah
Hi, Is there any solution to this issue ? I am facing it every week. Warm Regds Mallah. Rajesh Kumar Mallah wrote: Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) join email_subscriptions

Re: [SQL] Query becoming slower on adding a primary key

2004-06-02 Thread Rajesh Kumar Mallah
Even the first query used to run fine before but one fine day it changed plans i think. Regds Mallah. Rajesh Kumar Mallah wrote: Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) join

Re: [SQL] assistance on self join pls

2004-06-02 Thread Rajesh Kumar Mallah
Dear Darren, Your question is not very clear to me. On what columns do you want to aggregate? suppose u want to aggregate on outsite and inside ip you shud group by those columns and run a aggregate function like sum or avg etc , suppose u want the total traffic for every pair you can do this: sele

Re: [SQL] Query becoming slower on adding a primary key

2004-06-02 Thread Rajesh Kumar Mallah
Tom Lane wrote: [EMAIL PROTECTED] writes: tradein_clients=# explain analyze select email_id ,email ,contact from t_a a join email_source f using(email_id) join email_subscriptions h using(email_id) where 1=1 and f.source_id =1 and h.sub_id = 3 ; Runs for Eve

Re: [SQL] Problem in SQL Trigger

2004-04-30 Thread Rajesh Kumar Mallah
Can you tell us about the postgresql versions in 7.3 and 9.0 also post the actuall error message from postgresql. regds mallah. Ramesh Patel wrote: Hi i have one problem in Trigger. this trigger alread work on Red Hat Linux 7.3 but now i shift to RHL9.0 in RHL 9.0 not working . in this problem in

Re: [SQL] Logical comparison on Strings

2004-04-27 Thread Rajesh Kumar Mallah
kumar wrote: Dear Friends, Postgres 7.3.2 on Linux 7. I want to compare to columns and get the logical result as follows. C1 is 'YNYNY' . C2 is 'NNYYY'. I want to compare like AND and OR operators. C1 AND C2 should give result like NNYNY. C1 OR C2 should give result like YNYYY. Bit Strin

Re: [SQL] Querying two databases

2004-04-16 Thread Rajesh Kumar Mallah
hi, its not possible to join cross database tables . you may keep tables in different schemas instead of databases. you may also try contrib/dblink to use tables from different database. Regds mallah. Pallav Kalva wrote: Hi, I am new to postgres and I need to do a query which joins two table

[SQL] Tsearch2 question: getting histogram of the vector elements

2004-03-10 Thread Rajesh Kumar Mallah
Greetings! My original problem is to de duplicate a list of around 0.3 million company names. Since a company name can be potentially (mis)spelt in numerous ways exactmatch obviously wont work. To make the searches faster i am using tsearch. For each company name i want to search other compa

Re: [ADMIN] [SQL] Database diagram

2004-01-23 Thread Rajesh Kumar Mallah
Dear Ganesan, pgautodoc (for dot output) + dot (from graphviz.org , creates postscript) + epssplit ( splits the postscript into multipage so that one can create poster size diagrams) works well for me. I have 45 tables in the database though. Regds mallah. Chris Travers wrote: There is a fre

[SQL] array_lower /array_prepend doubt

2004-01-21 Thread Rajesh Kumar Mallah
Greetings! can anyone explain why SELECT array_lower(array_prepend(0, ARRAY[1,2,3]), 1); returns 0 not 1 because tradein_clients=# SELECT array_prepend(0, ARRAY[1,2,3]); +---+ | array_prepend | +---+ | {0,1,2,3} | +---+ (1 row) and tradein_clients=# SE

[SQL] Adding a column to a VIEW which has dependent objects.

2004-01-10 Thread Rajesh Kumar Mallah
Dear PostgreSQL gurus, How do people extend a parent view which has lot of dependent views? The parent view cannot be dropped because that will require recreating a dozen of dependent views. Is there any workaround. Also is there an easy way of dumping the definitions of all the dependent views o

Re: [SQL] transaction processing after error in statement

2003-11-10 Thread Rajesh Kumar Mallah
Rod Taylor wrote: be recovered either. When committing a transaction the effects of all operations that did not fail will be made permanent. This is how transaction processing is described in the literature. I would be interested in reading that (URLs please) as I didn't see

Re: [SQL] Joined deletes but one table being a subquery.

2003-08-23 Thread Rajesh Kumar Mallah
I apologize for the silence. t_a as been created as CREATE TABLE t_a as SELECT userid,category_id from eyp_listing where userid=21742 and size ilike '%WEBFL%' EXCEPT SELECT userid,category_id from company_export_profile where userid=21742 ; so the subquery is basically ( SELECT userid,cat

[SQL] Joined deletes but one table being a subquery.

2003-08-22 Thread Rajesh Kumar Mallah
Hi Folks, DELETE from eyp_listing where userid=t_a.userid and category_id=t_a.category_id; such queries work perfectly. but if t_a is a subquery how to accomplish the delete. Regds Mallah. ---(end of broadcast)--- TIP 5: Have you checked our ext

Re: [SQL] ALTER TABLE ... DROP CONSTRAINT

2003-07-30 Thread Rajesh Kumar Mallah
if the constraint are named $1 $2 etc you will need to quote them eg ALTER TABLE xyz DROP CONSTRAINT "$1" ; in some version you may require ALTER TABLE xyz DROP CONSTRAINT "$1" RESTRICT; What is ur version btw? try to post the table structure also. regds mallah. Elielson Fontanezi wrote: H

Re: [SQL] relevance

2003-07-17 Thread Rajesh Kumar Mallah
On Thursday 17 Jul 2003 8:21 am, Terence Kearns wrote: > >>select id from tablename where message like '%sql%'; > >> > >>If there any way to determine exactly how many times 'sql' is matched in > >>that search in each particular row, and then sort by the most matches, > >>or am I going to have t

Re: [SQL] help yourself by helping others

2003-07-13 Thread Rajesh Kumar Mallah
dear ali, something like select machine,date_part('day' , date) , sum(withdrawals) from Table where date_part('month' , date)='month in question' group by machine,date_part('day' , date) ; will give you agrregated withdrawals by machine and day, use the frontend language for formatting it. no

Re: [SQL] Recursive request ...

2003-07-12 Thread Rajesh Kumar Mallah
Dear Bournon, There are already good implementation of Tree structures in databases ranging from using pure SQL to PostgreSQL specfic methods , less point in revinting wheel unless u really need. Some Pointers: "Tree-structure functions" http://www.brasileiro.net:8080/postgres/cookbook/ Gist

Re: [SQL] trigger proceedures in sql

2003-07-12 Thread Rajesh Kumar Mallah
Yes of course! contrib/dbmirror does execute a procedure written in 'C' called recordchange() ON update , insert , delete. If you need help in getting its source lemme know. regds Mallah. On Thursday 10 Jul 2003 11:10 am, adivi wrote: > hi, > > can trigger proceedures ( procedures to be

Re: [SQL] Blobs

2003-07-12 Thread Rajesh Kumar Mallah
net. Rajesh Mallah. On Thursday 10 Jul 2003 4:40 pm, sri devi wrote: > hi > > we have to download url files in to oracle using BLOBs how to create oracle > table stucture how to write the query,we are using oracle9i,and > javaswings,reply me to this id. [EMAIL PROTECTE

Re: [SQL] substr_count

2003-07-11 Thread Rajesh Kumar Mallah
(replace(field, !$searchterm, '')) might do > the job but replace doesn't allow for 'replace everything NOT string'; > > Any Ideas? > > Thanks in advance, -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91

Re: [SQL] Off topic : world database

2003-03-31 Thread Rajesh Kumar Mallah
;ll keep all my > > questions strictly to SQL. > > Regards > > Rudi. > > > > > > ---(end of broadcast)------- > > TIP 3: if posting/reading through Usenet, please send an appropriate > > subscribe-nomail command to [EMAIL PRO

Re: [SQL] FUNCTIONS PROBLEM

2003-03-23 Thread Rajesh Kumar Mallah
'kill -9' the postmaster > > > ---(end of broadcast)--- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) -- Rajesh Kumar Mal

Re: [SQL] explain

2003-03-21 Thread Rajesh Kumar Mallah
o know how can i make this from > other tool than pgsql. > In oracle when i issue an explain plan the explain insert values into a > table ( plan_table ). > Then i could select the values from plan_table. Is there similar > in postgres ? > > -- > Popeanga Mari

Re: [SQL] Novice needs help

2003-03-11 Thread Rajesh Kumar Mallah
nce... > > > > -- > Sparta, NC 28675 USA > 336.372.6812 > http://www.esc1.com > > > > > ---(end of broadcast)------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > --

[SQL] sql question regarding count(*)

2003-03-06 Thread Rajesh Kumar Mallah
s=# tradein_clients=# tradein_clients=# SELECT count(*) from public.users where userid=-1; count --- 0 (1 row) tradein_clients=# -- Regds Mallah ---- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(

Re: [SQL] Help with query involving aggregation and joining.

2003-02-24 Thread Rajesh Kumar Mallah
| 2002-02-22 > > > 3 | 104 | Maths| 2002-04-30 > > > 1 | 101 | Physics | 2002-01-20 > > > > I think you want to do something like: > > > > select distinct on (course.courseid) > > history.id, course.courseid, course.name, >

Re: [SQL] function defination help ..

2003-02-22 Thread Rajesh Kumar Mallah
Thank you i will look into its source code. and try to find some solution for myself. regds mallah. On Saturday 22 February 2003 07:40 am, Peter Eisentraut wrote: > Rajesh Kumar Mallah writes: > > is it possible to get the function creation defination as produced by > > pg_d

[SQL] function defination help ..

2003-02-21 Thread Rajesh Kumar Mallah
Hi, is it possible to get the function creation defination as produced by pg_dump by some SQL queries on system catalogs? pg_func stores procsrc but i am trying to get RETURNS and the arg part also. -- Regds Mallah Rajesh Kumar Mallah, Project

Re: [SQL] good style?

2003-02-21 Thread Rajesh Kumar Mallah
OREIGN KEY (users_id) REFERENCES users (users_id) > ) WITH OIDS; > > CREATE UNIQUE INDEX users_2_groups_usersgroups__idx ON users_2_groups > (users_id, groups_id); > > INSERT INTO users_2_groups VALUES (1, 1, 1, now(), NULL); > INSERT INTO users_2_groups VALUES (2, 1, 2, now(),

Re: [SQL] " Adding missing FROM-clause entry for table .... " problem.

2003-02-21 Thread Rajesh Kumar Mallah
essed as if > it were written as > > SELECT * FROM my_table AS m, my_table AS my_table WHERE my_table.a > 5; > > Regards, Christoph > > > > ---(end of broadcast)--- > TIP 2: you can get off all lists at once with t

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
03 February 2003 09:15 pm, Tom Lane wrote: > "Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > > I think if i do that i will hve to immediately upgrade > > all the 7.3.0 clients in other machines to 7.3.1 r

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
tely has all view definitions. > > Regards, Christoph -- -------- Regds Mallah Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)26152172 (221) (L) 9811255597 (M) Visit http://www.trade-india.com , India's Leading B

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
Thanks , if that is so i am upgrading it right away and posting you the results. Its my live DB server :-) Regds mallah. On Monday 03 February 2003 09:15 pm, Tom Lane wrote: > "Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > > I think if i do that i will hve to im

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
Thank you . But i have a problem , I think if i do that i will hve to immediately upgrade all the 7.3.0 clients in other machines to 7.3.1 rite? regds Mallah. On Monday 03 February 2003 09:10 pm, Tom Lane wrote: > "Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > &g

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
dex), eyp_listing_company_id btree (company_id), eyp_listing_email btree (email), eyp_listing_group_id btree (group_id), eyp_listing_size btree (size), eyp_listing_sno_branch btree (branch, sno), eyp_listing_userid btree (userid) Check co

[SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
in SELECT count(*) from shippers1 where city='DELHI'; ERROR: get_names_for_var: bogus varno 5 tradein_clients=# i can paste the nasty view definations if nothing is obvious till now. regds MAllah. Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New

Re: [SQL] Which version is this?

2003-01-31 Thread Rajesh Kumar Mallah.
10:13 pm, Wei Weng wrote: > Since which version PostgreSQL is able to do Vacuum Analyze even in the > middle of a transaction, namely, insert, delete, update? > > > Thanks > > > Wei -- Reg

Re: [SQL] converting microsoft sql server 2000 sql-code for postgresql 7.2.1

2003-01-28 Thread Rajesh Kumar Mallah.
gt; > ); > > INSERT INTO SPELERS VALUES ( > > 112, 'Baalen', 'IP', 'van', '1963-10-01', 'V', 1984, 'Vosseweg', > > '8', '6392LK', 'Rotterdam', '010-548745', '1319' > > ); > >

Re: [SQL] Implementing automatic updating of primary keys...

2003-01-16 Thread Rajesh Kumar Mallah.
ter set id=1 where id=2 will not be accepted. regds mallah. On Wednesday 01 January 2003 06:11 pm, Tomasz Myrta wrote: > Rajesh Kumar Mallah. wrote: > >Hi we are working on re-structuring our database schemas and > >intend to implement the functionality below at database level.

[SQL] Implementing automatic updating of primary keys...

2003-01-16 Thread Rajesh Kumar Mallah.
se level it self so that we do not have to keep modifying the mantainence programs as the number of tables referencing master table grows? regds mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597

Re: [SQL] sort by relevance

2003-01-15 Thread Rajesh Kumar Mallah.
--- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B e

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
'www.srs.fs.usda.gov')) from pubs; > > select substr(url,0,strpos(url,'www.srs.fs.usda.gov')) from pubs; > > select substr(url,strpos(url,'www.srs.fs.usda.gov')+19) from pubs; > > select substr(url,strpos(url,'www.srs.fs.usda.gov')+18) from pubs; &

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
rn Research Station > > E-Mail: [EMAIL PROTECTED] > Voice:(828) 259-0518 > Fax: (828) 257-4840 > Web: http://www.srs.fs.fed.us/ > === > > > > ---(end of broadcast)-

Re: [SQL] COPY command problems

2002-12-27 Thread Rajesh Kumar Mallah.
sk tests? If > > the COPY data is passing across a network, then network problems are > > also worthy of suspicion. > > > > regards, tom lane > > ---(end of broadcast)--- > TIP 2: you can get off all lists at once w

Re: [SQL] Stored Procedure Problem

2002-12-13 Thread Rajesh Kumar Mallah.
into an_integer,an_name emp_id,emp_name... > Second: you can't return 2 variables from plpgsql function. > > Tomasz Myrta > > > -------(end of broadcast)--- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] -- Rajesh Kumar Mallah, Project M

Re: [SQL] function replace doesnt exist

2002-12-13 Thread Rajesh Kumar Mallah.
es not exist > Unable to identify a function that satisfies the given argument types > You may need to add explicit typecasts > > > ---(end of broadcast)--- > TIP 3: if posting/reading through Usenet, please send an appropriate > subsc

[SQL] Moving tables accross schemas in PostgreSQL 7.3

2002-11-30 Thread Rajesh Kumar Mallah.
Hi folks, what would be the best way of moving my tables out of public schema to a schema "foo"? I have few a 100s of tables to move? Regds Mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,981

[SQL] How to take advantage of PREPARED QUERIES of PGSQL 7.3 in mod_perl enviornment?

2002-11-30 Thread Rajesh Kumar Mallah.
/perl/DBI ish ;-) Regds Mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace. ---(end of broadcast)-

[SQL] why the difference?

2002-11-20 Thread Rajesh Kumar Mallah.
DABAD 781 | 5000 | RSV EXPORT| COIMBATORE (4 rows) Can anyone please explain the difference? Regds Mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-indi

Re: [SQL] Output of function into a file

2002-11-12 Thread Rajesh Kumar Mallah.
nside the > function. > > I would be very glad if someone could help me > > Thanks in advance > > karthick v > > ---(end of broadcast)--- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org

Re: [SQL] enforcing with unique indexes..

2002-10-04 Thread Rajesh Kumar Mallah.
fields and it will do the rest. For more details, try > > $ \h CREATE INDEX > > regards, > bhuvaneswaran -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India&#x

[SQL] enforcing with unique indexes..

2002-10-04 Thread Rajesh Kumar Mallah.
group_id from eyp_listing group by group_id having count(distinct userid) > 1 ; always returns empty. can it be done with some sort of UNIQUE INDEX? Regds MAllah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221)

  1   2   >