Re: [SQL] 'no wait' option for locks

2002-07-21 Thread mallah
Hi, Why not the program create a lock file on start and delete it when finished. regds mallah. > Hi... > > anyone knows a workaround for Oracles "no wait" option in "SELECT ... > FOR UPDATE"? > > I wrote a programm which runs twice. Both poll the pgsq

Re: [SQL] STATISTICS?

2002-08-03 Thread mallah
do you need http://www.postgresql.org/idocs/index.php?monitoring-stats.html ? Folks, > > Can anyone point me to documentation on the new STATISTICS features of 7.2? I can't >seem to > find anything in the online docs, except the barest mention of ALTER TABLE SET >STATISTICS > (which doesn't

Re: [SQL] getting ILIKE or ~* to use indexes....

2002-08-10 Thread mallah
Thanks Josh I normally use tsearch for full text search i will probably use that or may be this what u suggested. regds mallah. > Rajesh, > >> I want my query to use indexes for company name searches but its not happening >unless >> is use '=' which does n

Re: [SQL] tree structures in sql - my point of view (with request

2002-09-03 Thread mallah
f PG ;-) regds mallah. > While I don't have a time to comment your message I want to point to contrib/ltree >package > which is extremely fast :-) > > http://www.sai.msu.su/~megera/postgres/gist/ltree > > Oleg > On Tue, 3 Sep 2002, Hubert depesz Lubaczewski w

Re: [SQL] new calculated column

2002-09-05 Thread mallah
varchar u may translate to the corresponding SQL. regds mallah. > Hi; > > I've got a table with two fields and about 3000 rows, the second one is a character >field, what > can have about twenty different values; of course these values are repeated a lot of >times in > the tab

Re: [SQL] Displaying current queries on the database?

2002-09-09 Thread mallah
its possible, select * from pg_stat_activity after AS connect as postgres. THOUGH NEEd to configure postgresql.conf accordigly regds mallaH > I was wondering if there is a way to display all of the current queries that are >being > submitted to the database. Thanks in advance. &

Re: [SQL] Drop NOT NULL constraint !!!

2002-11-20 Thread mallah
do a \d tablename for the name of the contraint. say its $1 the do psql> alter table drop contstraint "$1" RESTRICT; > Does anybody could tell me how to drop a constraint on a column where no name was >provided to > the constraint? How does Pg name constraints? > > Thanks > -- > Renê Salomão

Re: [SQL] How to recover Data

2002-11-26 Thread mallah
shud be inturrupted to avoid further (grave) complications. Good Luck with your data, regds mallah. PS: its not easy to loose data with pgsql ;-) > I had a m/c with Postgres 7.2 and huge amount of data. on Power > failure and restart of the m/c pgsql refused connect to any of the database.

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread mallah
es (?,?)"); $sth -> execute($a , $b ); $sth -> finish(); $dbh -> commit(); $dbh -> disconnect(); regds mallah. I'd like to put escape characters in my > insert command to accommodate for ' > (i.e. O'Brien, O'Malley, etc). I've tired double quotes, si

Re: [SQL] How to rename and drop a column in pg7.3?

2003-01-30 Thread mallah
Hmmm... both are supported in 7.3.x ALTER TABLE rtfm RENAME f1 to f2 ; ALTER TABLE rtfm DROP COLUMN f3; hope it helps. regds mallah. > > I need to rename and remove columns of a table. Is any new way to accomplish the two >tasks in > 7.3? I have searched the online document a

Re: [SQL] returning table from a function

2003-02-02 Thread mallah
Hmm.. do you mean functions returning sets then http://techdocs.postgresql.org/guides/SetReturningFunctions is for you. regds mallah. - Get your free web based email at trade-india.com. "India's Leading B2B eMarketplace.!" h

Re: [SQL] Help with a query for charting

2003-02-02 Thread mallah
you could keep a table with list of all possible days in a month. left join that to the results you get from query below this will return NULL for days where there is no data. NULL could then easily converted to 0 using CASE or COALESCE. regds mallah. > I'm trying to do a query to c

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread mallah
Hi , This is to confirm that the EXPLAIN problem does not occur anymore after successfully upgrading to 7.3.1 from 7.3.0 Thanks everyone. Regards Mallah. explain select * from shippers1 where city='

[SQL] simulating partial fkeys..

2003-06-06 Thread mallah
hi , Is there any way to enforce fkeys only on subset of the table something on the lines of unique partial indexes or any work around ? (on update or insert trigger is the only thing i can think of) regds mallah. - Get your free web based email at

[SQL] Getting rid of accents..

2003-05-27 Thread mallah
Is there any easy way for converting accented text to closest text without accents in postgresql ? eg: BÂLÂ MORGHÂB to BALA MORGHAB Regds Mallah. - Get your free web based email at trade-india.com. "India's Leading B2B eMarketpla

Re: [SQL] Getting rid of accents..

2003-05-27 Thread mallah
y text into database. Regds Mallah. > On Tuesday 27 May 2003 22:55, [EMAIL PROTECTED] wrote: >> Is there any easy way for converting accented text to >> closest text without accents in postgresql ? >> >> eg: >> >> BÂLÂ MORGHÂB to BALA MORGHAB > > Have

Re: [SQL] disabling triggers

2003-06-17 Thread mallah
> Mallah, > >> Is setting reltriggers=0 on pg_class an accepatble way of >> disabling triggers on a table temporarily? Ok , but someone on list was scary few months back. > > Yes. pg_dump does this. > >> secondly is it worth having commands like >> al

Re: [SQL] disabling triggers

2003-06-17 Thread mallah
> Mallah, > >> >> Is setting reltriggers=0 on pg_class an accepatble way of >> >> disabling triggers on a table temporarily? >> >> Ok , but someone on list was scary few months back. > > I've done it many times without a problem. The trick i

Re: [SQL] max length of sql select statement ?

2003-07-07 Thread mallah
Depending on ur original problem EXISTS or IN may be usable EXISTS is efficient and IN can be used efficiently in 7.4 version of postgresql regds mallah. > Hi All! > > I was searching the archive and was wondering why nobody asked this > strange(!) question (or I

Re: [SQL] max length of sql select statement ?

2003-07-07 Thread mallah
limit. May be someone else can answer it accurately. But you could produce the list within IN using a subselect that again depends on the exact problem. regds Mallah. > > And what means efficient? Goes the DB only once through the table? > > Cheers, Markus > > > > >

[SQL] disabling triggers

2003-06-17 Thread mallah
we feel the trigger execution to be unneccessary. regds mallah. - Get your free web based email at trade-india.com. "India's Leading B2B eMarketplace.!" http://www.trade-india.com/ ---(e

[SQL] Query becoming slower on adding a primary key

2004-06-01 Thread mallah
table it does not work. Can anyone please help me with this problem? below are the details. thanks in advance. Regds Mallah. 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

[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] 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

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

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] sequence chages after firing update

2002-06-26 Thread Rajesh Kumar Mallah.
hankz in advance > > regards > subha > > > __ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > > > ---(end of broadcast)------- > TIP 4: Don't 'kill -9' t

[SQL] Efficient Query For Mapping IP Addresses To Country Code.

2002-06-26 Thread Rajesh Kumar Mallah.
7;203.196.129.1' between start_ip and end_ip; NOTICE: QUERY PLAN: Seq Scan on ip_country_map (cost=0.00..1356.83 rows=5428 width=6) EXPLAIN access_log=# IS THERE ANYTHING woring with my database schema? how shud i be storing the the data of ipranges and country for efficient utilizatio

Re: [SQL] how to write procedures

2002-07-04 Thread Rajesh Kumar Mallah.
--(end of broadcast)--- > 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) ,981125

Re: [SQL] Can this be done with sql?

2002-07-04 Thread Rajesh Kumar Mallah.
and unsubscribe commands go to [EMAIL PROTECTED] -- 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

[SQL] Is Dropping a column "CHECK" constraint possible?

2002-07-05 Thread Rajesh Kumar Mallah.
ALTER TABLE [ ONLY ] table DROP CONSTRAINT constraint { RESTRICT | CASCADE } ==== Regards Mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (

Re: [SQL] Is Dropping a column "CHECK" constraint possible?

2002-07-05 Thread Rajesh Kumar Mallah.
Yup it did!. Thanks a ton, it was there in the ALTER TABLE documentation i overlooked :-( regds mallah. On Saturday 06 July 2002 10:05, Christopher Kings-Lynne wrote: > > can anyone please help? > > i have a to drop a check contstraint from a column. eg > > > >

Re: [SQL] Can this be done with sql?

2002-07-07 Thread Rajesh Kumar Mallah.
Hi, You cannot easily return datasets from stored procedures. there has been lots of discussion on it. regds mallah. > yes, thank you, that may help but unfortunately there are are few more > problems to face. > > 1. I will need to select groups from anywhere in the table

Re: [SQL] Is Dropping a column "CHECK" constraint possible?

2002-07-07 Thread Rajesh Kumar Mallah.
h( btrim(imp) ) > 1 or imp is NULL ); regards mallah. On Saturday 06 July 2002 10:05, Christopher Kings-Lynne wrote: > > can anyone please help? > > i have a to drop a check contstraint from a column. eg > > > > tradein_clients=# \d t_a > >Tab

Re: [SQL] INSERT only under certain conditions (SELECT)

2002-07-08 Thread Rajesh Kumar Mallah.
create an uniq index on the columns, # create unique index index_name on table (col1,col2,col3,...) hope it helps. regds mallah On Monday 08 July 2002 06:48, Joachim Trinkwitz wrote: > Hi, > > I want to insert a row only under condition that there isn't already > another

[SQL] Cascading deletions does not seem to work inside PL/PGSQL functions.

2002-07-16 Thread Rajesh Kumar Mallah.
when i delete the corresponing referenced record from the master table. But things as expected inside a Transaction at the PSQL prompt. any help is very much appreciated. regds mallah. stuff in test_case.sql --- -- W A R N I N G --- scripts will

Re: [SQL] How do I concatenate row-wise instead of column-wise?

2002-07-16 Thread Rajesh Kumar Mallah.
t; etc... > > Thus, the concatenating operator never works on other rows than the > present. How can I get around that and still stick to the postgresql > syntax? > > Regards > Marcus > > > > ---(end of broadcast)--

Re: [SQL] Cascading deletions does not seem to work inside PL/PGSQL functions.

2002-07-16 Thread Rajesh Kumar Mallah.
On Tuesday 16 July 2002 21:41, you wrote: > On Tue, 16 Jul 2002, Rajesh Kumar Mallah. wrote: > > Hi folks, > > > > This problem has been troubling me for quite sometime and > > I would be very thankful for your help. > > > > I have included the complete comm

Re: [SQL] How to find out if an index is unique?

2002-07-17 Thread Rajesh Kumar Mallah.
bank_email ON email_bank USING btree (lower(email)) (1 row) substitue 'email_bank_email' with name of your index. regds mallah. On Wednesday 17 July 2002 15:36, Dirk Lutzebaeck wrote: > Hello, > > is there a way to ask the system tables if a given index was created &g

Re: [SQL] Cascading deletions does not seem to work inside PL/PGSQL functions.

2002-07-17 Thread Rajesh Kumar Mallah.
i delete the recored in the master (M). so that i do not have to explicitly delete from each of the tables x,y,z, etc. actually i want to reinsert the records in the table x,y,z as well as M with some modification. sorry for my english. regds mallah. > I'm not sure what you mean by th

Re: [SQL] Cascading deletions does not seem to work inside PL/PGSQL functions.

2002-07-17 Thread Rajesh Kumar Mallah.
Thanks for your reply. Stephan. On Thursday 18 July 2002 12:01, you wrote: > On Thu, 18 Jul 2002, Rajesh Kumar Mallah. wrote: > > > what if i do not want to fire sperate delete SQLs for the slave > > > > > > > tables ? > > > > Hi , > >

[SQL] Is login_cnt is reserved attribute name?

2002-07-30 Thread Rajesh Kumar Mallah.
Hi i did nothing but changed attribute name from 'login_cnt' to 'cnt_login' and my update stmt started working? I am using DBD::Pg + postgresql 7.2.1 i will try to produce a test case. regds mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Networ

[SQL] possible bug in \df+

2002-08-02 Thread Rajesh Kumar Mallah.
mp_id || '#' || tmp_record.category_id || ':' || tmp_record.name ; END IF; RETURN tmp_code; END; regds mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L

[SQL] Ltree usage..

2002-08-02 Thread Rajesh Kumar Mallah.
fied_data where path ~ '*.180.*' or path ~ '*.1.*'; is better written as Qry3: SELECT path from unified_data where path ~ '*.180|1.*' ; also is qry3 better to Qry2 in terms of performance? regds mallah. -- Rajesh Kumar Mallah, Project Manager (Development

Re: [SQL] Ltree usage..

2002-08-02 Thread Rajesh Kumar Mallah.
6121 | {0.180.227,0.64.814} 6084 | {0.180.227,0.64.814} 6066 | {0.180.227,0.64.810} (10 rows) gives me the correct result but i am not sure if its the most efficient. I will be using it for medium sized dataset approx 100,000 that there will be such search on upto four such indexe

[SQL] getting ILIKE or ~* to use indexes....

2002-08-09 Thread Rajesh Kumar Mallah.
st=0.00..6.26 rows=1 width=25) EXPLAIN tradein_clients=# Regards 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. -

[SQL] Difference between is true and = 't' in boolean feild. & bitmap indexes

2002-08-16 Thread Rajesh Kumar Mallah.
Any can anyone explain me why in a query of a boolean feild "is ture" does not indexes where as = 't' does? is "is true" not a more standard SQL than " = 't' ". Also is there any working implementation of BITMAP INDEXES in postgresql as f

[SQL] BITMAP INDEXES...

2002-08-22 Thread Rajesh Kumar Mallah.
). is it just in terms of space requirements for performance too? 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 eMarket

[SQL] Index usage on date feild , differences in '>' and '>=' and between

2002-09-18 Thread Rajesh Kumar Mallah.
Hi , I am trying to improve a query to use existing indexes but facing diffculty. Looks like 'between' amd '>=' are not using indexes althoug > and < does. all my application code uses between and i am sure it use to work fine at one point of time.

Re: [SQL] Index usage on date feild , differences in '>' and '>=' and between

2002-09-18 Thread Rajesh Kumar Mallah.
enerated; generated | count +--- 2002-09-10 | 442 2002-09-11 | 1060 2002-09-12 | 641 2002-09-13 | 607 2002-09-14 | 1320 2002-09-15 | 521 2002-09-16 | 1474 2002-09-17 | 940 2002-09-18 | 1005 2002-09-19 | 178 (10 rows) Last Question , Shud i do "e

[SQL] Appending to an array[] feild...[ ltree ]

2002-09-20 Thread Rajesh Kumar Mallah.
{1.1.1,1.1.2,1.1.3,1.1.4,1.1.1} to want it to remain the same ie,{1.1.1,1.1.2,1.1.3,1.1.4} becoz 1.1.1 is already present in the [] , does there exists any function to probe an ltree[] feild for existance ? Regards Mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone

Re: [SQL] check source of trigger

2002-09-26 Thread Rajesh Kumar Mallah.
Hi, In case you doing all this to replicate tables conside contrib/dbmirror it does it fairly elegantly. regds mallah. On Friday 20 September 2002 13:55, wit wrote: > Hello, > > I have a question about trigger. I have tables with the following > structure: > > create tabl

[SQL] Preventing DELETEs

2002-09-26 Thread Rajesh Kumar Mallah.
nd up with having the permission can any one tell me how the prevention can be accomplished? thanks in advance. 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

Re: [SQL] Preventing DELETEs

2002-09-26 Thread Rajesh Kumar Mallah.
ses Name | Owner -+-- template0 | postgres template1 | postgres tradein_clients | tradein (this is me) (3 rows) tradein_clients=> regds Mallah. On Friday 27 September 2002 00:30, dima wrote: > > I have a created a database an

Re: [SQL] Preventing DELETEs

2002-09-26 Thread Rajesh Kumar Mallah.
Hi Robert, I will be obliged to receive the "real" code , if its feasible for you. I am not used RULEs before. regds mallah. On Friday 27 September 2002 00:39, Robert Treat wrote: > In psuedo-code : create rule on mytable on delete return null > > Robert Treat > > On

Re: [SQL] Preventing DELETEs

2002-09-26 Thread Rajesh Kumar Mallah.
ke delete on my table from tradein (which is me) ; tradein_clients=> BEGIN WORK; delete from users where userid=34866; BEGIN ERROR: users: Permission denied. tradein_clients=> ROLLBACK ; ROLLBACK tradein_clients=> UPDATE users set password='mallah' where userid=34866; UPDATE 1 tr

[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)

Re: [SQL] enforcing with unique indexes..

2002-10-04 Thread Rajesh Kumar Mallah.
Sorry Bhuvan it wont work, COMPOSITE UNIQUE INDEX will prevent entry of rows like (group_id,user_id) 1 1 1 1 what i want to prevent is this: 1 1 1 2 did you notice the distinct inside the count? regds mallah. On Saturday 05 October 2002 12:36, Bhuvan A wrote: > > SELECT gr

Re: [SQL] Output of function into a file

2002-11-12 Thread Rajesh Kumar Mallah.
in 7.3 you will be able to return multiple rows with multiple columns. 7.3 stable is going to be out soon as it in beta 5 stage currently. regds mallah. On Saturday 09 November 2002 11:00, karthick v wrote: > Hi, > > I am writing a small function to manipulate records in multiple

[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

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

2002-11-30 Thread Rajesh Kumar Mallah.
able? i have 20-30 kinds of SQL statements that my webapps frequently execute, how many prepared queries can be stored in a backend without scalability issues. will it be an acceptable usage pattern of this new feature in a mod_perl environment? Sorry if my mail is sounding too mod

[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

Re: [SQL] function replace doesnt exist

2002-12-13 Thread Rajesh Kumar Mallah.
Are you looking for this ? available on http://www.brasileiro.net:8080/postgres/cookbook/view-one-recipe.adp?recipe_id=23 regds mallah. View One Recipe Home -> Postgres -> CookBook Home -> View One Recipe Submitted on: 03-16-2001 Description: mimic oracle's replace functio

Re: [SQL] Stored Procedure Problem

2002-12-13 Thread Rajesh Kumar Mallah.
. hope it will help , if not please revert back. regds mallah. On Thursday 12 December 2002 08:21 pm, Tomasz Myrta wrote: > Atul wrote: > > CREATE FUNCTION b_function() RETURNS varchar AS ' > > > > DECLARE > > > > an_integer int4; > >

Re: [SQL] COPY command problems

2002-12-27 Thread Rajesh Kumar Mallah.
http://www.memtest86.com/ may be useful. regds mallah. On Tuesday 24 December 2002 09:25 pm, Nikola Ivacic wrote: > It must be internal error: > two reasons: > 1.) the original file is OK (I checked with grep + there is no network > envolved) > 2.) Error has strange patern:

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
: -- UPDATE publications SET url = replace( 'www.srs.fs.fed.us' , 'www.srs.fs.usda.gov' , url ) WHERE url ilike '%www.srs.fs.fed.us%'; -- regds mallah. On Wednesday 08 January 2003 07:32 pm, Randy D. McCracken wrote: > I apologize for

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
any anyone explain whats wrong with the replace based solution to this problem which i posted earlier? did i misunderstood anything? regds mallah. On Thursday 09 January 2003 01:48 am, Randy D. McCracken wrote: > Just to close off another thread and to give a tad more information... > &

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

[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] 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.

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

2003-01-28 Thread Rajesh Kumar Mallah.
Only 1 small change makes it acceptable to pgsql. change datetime to timestamp . regds mallah. On Tuesday 28 January 2003 03:38 pm, william windels wrote: > Hello all, > > I a m a new member of the list and at the moment , I am studiing > informatica: sql. > > At the

Re: [SQL] Which version is this?

2003-01-31 Thread Rajesh Kumar Mallah.
your question doesnt' seem to be very clear. But the following appeared in release note of version 7.2 hope it helps regds mallah. ` A.5. Release 7.2 Release date: 2002-02-04 A.5.1. Overview This release improves PostgreSQL for use in high-volume applica

[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] 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

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.
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.
ef) > > Did you ever try > > SELECT * FROM pg_views ; i thing when you do a \d it uses that only. in any case i have verified that the content in them are equally messed up. regds mallah. > > It defini

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
ome to psql 7.3.1, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit tradein_clients=> regds mallah. On Monday

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

2003-02-21 Thread Rajesh Kumar Mallah
Hmmm i forgot to follow up. Thanks for pointing out the relevent Docs. Regds Mallah. On Tuesday 18 February 2003 04:04 pm, Christoph Haller wrote: > > We find that if we alias a tablename and refer to that tablename in > > where cluase instead of reffering > > > to the al

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

Re: [SQL] good style?

2003-02-21 Thread Rajesh Kumar Mallah
Guide.) The genetic search takes less time, but it won't necessarily find the best possible plan. regds mallah. On Friday 21 February 2003 07:00 pm, Rafal Kedziorski wrote: > hi, > > I have 8 tables and this query: > > select u.users_id, m.name as mandant_n

[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] Help with query involving aggregation and joining.

2003-02-24 Thread Rajesh Kumar Mallah
ERROR: SELECT DISTINCT ON expressions must match initial ORDER BY expressions may be gotten over by wrapping the first query result in a subselect. not sure though if its proper. regds mallah. test=# SELECT * from ( SELECT distinct on (a.id) b.id ,courseid,name,submission from course a

[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] Novice needs help

2003-03-11 Thread Rajesh Kumar Mallah
shud use NOT EXISTS instead of NOT IN as others have suggested . becoz NOT IN is not very efficient at the moment except the case on there are small number of items in IN( ... ) regds mallah. On Wednesday 12 Mar 2003 2:16 am, Terry Lee Tucker wrote: > I answered my own question. Yes,

Re: [SQL] explain

2003-03-21 Thread Rajesh Kumar Mallah
Dear Marian, in postgresql 7.3 explain commands retruns as set of rows. The result of EXPLAIN can just be fecthed as result of any other SELECT query and manipulated further. i hope it helps. sorry if i did not get ur problem rite. regds mallah. On Friday 21 Mar 2003 11:51 am

Re: [SQL] FUNCTIONS PROBLEM

2003-03-23 Thread Rajesh Kumar Mallah
CREATE TYPE can be used as well i think in that case "as (val1 int, val2 int, val3 real, val4 char);" need not be done while selecting. regds mallah On Monday 24 Mar 2003 4:48 am, David Witham wrote: > Hi Mario, > > I have used a record type to do this: > > create m

Re: [SQL] Off topic : world database

2003-03-31 Thread Rajesh Kumar Mallah
application similar to you which shud be able to get all the places within certaint radius of the place in question. Any hint on how i shud be proceeding? Regds mallah. On Monday 31 Mar 2003 6:02 am, Rudi Starcevic wrote: > Hi all, > > A quick email to let you know where I'

Re: [SQL] substr_count

2003-07-11 Thread Rajesh Kumar Mallah
attempting to search text in a feild and sort it by relevence then contrib/tsearch V2 is for you. http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ regds mallah. > Of course the substr_count function does not exist. Is there anyway to > do this? > > I had a thought char_count

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] 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

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] help yourself by helping others

2003-07-13 Thread Rajesh Kumar Mallah
the frontend language for formatting it. note that it will not display the days for which there has been no withdrawls. If u need to report them also 0 then create a table that holds 1 year of dates and left or right join the output of first query with it. exact query is not being provided , its ju

Re: [SQL] relevance

2003-07-17 Thread Rajesh Kumar Mallah
then sort by the most matches, > >>or am I going to have to write a script to do the sorting for me? > > You could probably write a function in postgres (say, "matchcount()") > which returns the match count (possibly using perl and a regex). Why reinvent the wheel when

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. Elie

[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

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

2003-08-23 Thread Rajesh Kumar Mallah
ECT 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 ) regds mallah. On Friday 22 Aug 2003 3:53 pm, Tomasz Myrta wrote: > > Hi Folks, > > > > DELETE from e

Re: [SQL] transaction processing after error in statement

2003-11-10 Thread Rajesh Kumar Mallah
not a violation of above defination of transaction ? Regds Mallah. The "execution result is completely successful" could certainly be used to back up PostgreSQLs choice to force a rollback. However, it doesn't differentiate between execution of what the user requested, and e

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

2004-01-10 Thread Rajesh Kumar Mallah
of a given object. Does information_schema helps here. Regds mallah. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] array_lower /array_prepend doubt

2004-01-21 Thread Rajesh Kumar Mallah
=# SELECT array_lower( ARRAY[0,1,2,3],1 ); +-+ | array_lower | +-+ | 1 | +-+ (1 row) Time: 402.614 ms Regds Mallah. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

  1   2   >