[SQL] PL/pgSQL

2000-08-07 Thread Jie Liang
it in execuable block? like: declare ary int[5];-- in PL/pgSQL maybe is _int; began ary[1]:= 3;-- give me error when I run it; end; Thanks. -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED

[SQL] % escape

2000-08-15 Thread Jie Liang
Hi,there, Is anybody know how I can escape % or ' (my column contains % or ' ) in my text field. select mystring from textbook where mystring like . -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED

Re: [SQL] Optimizing huge inserts/copy's

2000-08-29 Thread Jie Liang
! Mail - Free email you can access from anywhere! http://mail.yahoo.com/ -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] Optimizing huge inserts/copy's

2000-08-30 Thread Jie Liang
Hi, there, I tried different ways, include vaccum table , ensure index works, it still is as slow as ~100rows per minute. Stephan Szabo wrote: On Tue, 29 Aug 2000, Jie Liang wrote: Hi, there, 1. use copy ... from '.'; 2. write a PL/pgSQL function and pass multiple records

Re: [SQL] Optimizing huge inserts/copy's

2000-08-30 Thread Jie Liang
your indexes again. Good luck. --- Jie Liang [EMAIL PROTECTED] wrote: Hi, there, I tried different ways, include vaccum table , ensure index works, it still is as slow as ~100rows per minute. Stephan Szabo wrote: On Tue, 29 Aug 2000, Jie Liang wrote: Hi

Re: [SQL] Query on array-elements inside object

2000-09-05 Thread Jie Liang
ll be helpful. regards, Uma. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 1

Re: [SQL] 7.0.2: Arrays

2000-09-05 Thread Jie Liang
ser: parse error at or near "[" ler=# -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 (voice) Internet: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 -- Jie LIANG Internet Products Inc. 10350 Science Center

Re: [SQL] Protection of tables by group and not by users

2000-09-06 Thread Jie Liang
to protect a table of Postgresql by a group of persons instead of giving a list of persons ? Thanks for your answers Regards nicolas michaud -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] Cascading Deletes

2000-09-06 Thread Jie Liang
. For example: 0 0 Base 1 0 Sib1 2 0 Sib2 3 0 Sib3 4 1 Sib1_1 5 1 Sib1_2 Deleting Base would remove all the entries. Deleting Sib1 would delete Sib1_1 and Sib1_2. Can anyone help out here? Regards, Craig May Enth Dimension http://www.enthdimension.com.au -- Jie LIANG Internet Products Inc

Re: [SQL] Group by within table joins

2000-09-13 Thread Jie Liang
many time each vehicle has been borrowed. Please help. Thanks. - Bernie -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] Error with DISTINCT

2000-09-15 Thread Jie Liang
GROUP BY testdb-#table_2.f1, table_1.f2; Is it a bug ? Thanks in advance. Jerome. -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

[SQL] info about tables

2000-09-18 Thread Jie Liang
Hi, I want drop some tables, is there any way to get the info which can show when the tables were used last time? I mean that I want know when this table is used last time? -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873

Re: [SQL] PLSQL

2000-09-13 Thread Jie Liang
Hi, there, http://www.postgresql.org/doxlist.html I.10, III.45 Paulo Roberto Siqueira wrote: Where can I find a tutorial on PL/SQL for postgres? Is there any documentation focused on it on postgres' site? Thank you -- Jie LIANG Internet Products Inc. 10350 Science Center

Re: [SQL] Convert from Seconds-Since-Epoch to Timestamp

2000-09-21 Thread Jie Liang
(an integer) to timestamp? I am sure it is easy, but I can't find it in the docs, so far. Thanks Webb __ Do You Yahoo!? Send instant messages get email alerts with Yahoo! Messenger. http://im.yahoo.com/ -- Jie LIANG Internet Products Inc. 10350

Re: [SQL] select

2000-09-25 Thread Jie Liang
, - PostgreSQL Inc | Hub.Org Networking Services [EMAIL PROTECTED] | [EMAIL PROTECTED] www.pgsql.com | www.hub.org 1-902-542-0713 | 1-902-542-3657 - Fascimile : 1 902 542 5386 IRC Nick : bignose -- Jie LIANG Internet Products Inc. 10350

Re: [SQL] Data Type precision

2000-09-26 Thread Jie Liang
) (6,2) anybody can help me ? Thanks. Jerome. -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] copying/moving from one table to another

2000-09-27 Thread Jie Liang
-- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] how to store a query, that results in a table

2000-09-22 Thread Jie Liang
ble to find a way in order to obtain a table like result. Only we could obtain a single row by using the rtype " returns setof varchar". I hope a soon answer. Thank you. Nelson B. -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] if else query help

2000-10-12 Thread Jie Liang
fax 436-0137 and non-profit organizations. pager 338-4078 San Francisco -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] COUNT

2000-10-19 Thread Jie Liang
Hi, there, You want how many rows in your table??? select count(*) from yourtablename; Craig May wrote: Hi, How do I get a row count, like "Select [COUNT] from Table" ?? Regards, Craig May Enth Dimension http://www.enthdimension.com.au -- Jie LIANG Internet Products I

Re: [SQL] Problem whith Stored queries

2000-10-26 Thread Jie Liang
Hi, anybody know how to call shell command in postgres rule or trigger, urgent!! -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

[SQL] need help urgent

2000-11-03 Thread Jie Liang
, pg_user where aggowner = usesysid We have no script to open a new session[1642], how this happen? how I to prevent this?? Thanks! -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

[SQL] plperl

2000-10-25 Thread Jie Liang
lobal", line 294: Need an operator "../../../src/Makefile.global", line 296: Need an operator "../../../src/Makefile.global", line 299: Need an operator "../../../src/Makefile.global", line 301: Need an operator "../../../src/Makefile.global", line 304: Need an operator make: fatal errors encountered -- cannot continue su-2.04# what I need to do? -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] how to execute a C program via trigger ?

2000-12-07 Thread Jie Liang
(insert,delete,update), is there any other special variable can tell me howmany success. Like SQL%ROWCOUNT in Orcale?? And if there is an error such as : cannot insert since duplicate key on an unique index, is it possible to catch it?? Thanks. -- Jie LIANG Internet Products Inc. 10350 Science

Re: [SQL] plpgsql

2000-12-12 Thread Jie Liang
OO, That's a big disadvantage, because if the table is huge, using select stmt walking even on an index will take some time and duplicate occur not often, efficiency is a big problem. Thanks anyway. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121

[SQL] select ... for update

2000-12-12 Thread Jie Liang
condition [, ...] ] [ { UNION [ ALL ] | INTERSECT | EXCEPT } select ] [ ORDER BY column [ ASC | DESC | USING operator ] [, ...] ] [ FOR UPDATE [ OF class_name [, ...] ] ] LIMIT { count | ALL } [ { OFFSET | , } start ] can any one give me a example?? -- Jie LIANG Internet Products

[SQL] plpgsql

2000-12-13 Thread Jie Liang
Hi, How can I declare an array in plpgsql?? when I use declare url text[10]; ERROR: parse error at or near "[" if I use _text; declare is OK, however, when I assgin a value after BEGIN url[i]:=whatever; get same ERROR, Is it possible to return an array from a plpgsql function??

Re: [SQL] Problem with function...

2000-12-18 Thread Jie Liang
Hi, there, modify the code as following. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Mon, 18 Dec 2000 [EMAIL PROTECTED] wrote: Hi, I hope my question is appropriate for this list

Re: [SQL] SQL query not working when GROUP BY / HAVING is used

2000-12-19 Thread Jie Liang
I hope it may help: 1. if you use group clause in a select stmt, the select list must be agregate function such as sum(field),count(field), max(field)..., cannot use field. 2. for field have NULL field, should use field IS NULL, = NULL will give you wrong result! Jie LIANG Internet Products

Re: [SQL] SQL query not working when GROUP BY / HAVING is used

2000-12-19 Thread Jie Liang
Hope it helps: 1. If you use GROUP, the select list should sum|count|max ..., no single field. 2. If you use NULL, the condition should be field IS [NOT] NULL, = NULL will give the wrong answer. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121

Re: [SQL] question on SELECT

2000-12-19 Thread Jie Liang
use: \dt -- all tables \dv -- all views \df -- all functions ... Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On 19 Dec 2000, Prasanth A. Kumar wrote: Howard Hiew [EMAIL PROTECTED

Re: [SQL] Create table doesn't work in plpgsql

2000-12-20 Thread Jie Liang
Hi,there, I don't think you can use DDL(data definition language) in PL/SQL. create table is not DML(data munipulation language) instead it's a DDL. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED

Re: [SQL] `~' operator and indices

2000-12-20 Thread Jie Liang
Hi, there, Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Wed, 20 Dec 2000, Artur Rataj wrote: Hello, I would like to ask you why do `~' gives the following results, if there is an index

Re: [SQL] How to set autocommit on/off

2000-12-20 Thread Jie Liang
Hi, there, I think you can use : BEGIN;-- turn off any DDL stmts -- you can rollback them by ROLLBACK; END|COMMIT; -- turn on Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Wed

[SQL] hex number

2001-01-08 Thread Jie Liang
Hi, Does anybody knows that is any function can covert an inet(IP addr) type to a hex number?? Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] How to change the ownership of the table?

2001-01-24 Thread Jie Liang
then if you have the previlage. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Wed, 24 Jan 2001, Ramesh H R wrote: Hai Please, any one guide me how to change the ownership of the table? Regards

Re: [SQL] ' in SQL INSERT statement

2001-01-25 Thread Jie Liang
Hi, Using a backslash to escape it. insert into table(field) values('what\'s that'); Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Thu, 25 Jan 2001, Markus Wagner wrote: Hi, I have

Re: [SQL] interval query.

2001-01-31 Thread Jie Liang
Hi, where id= or id between 3 and 12; or where id in (3,4,5,6,7,8,9,10,11,12,); Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Wed, 31 Jan 2001, Antti Linno wrote: Good morning

Re: [SQL] Array as parameter in plpgSQL functions

2001-01-31 Thread Jie Liang
e.g. create function foo(_int4) returns int2 as' declare a _int4 alias for $1; i int:=1; begin while a[i] loop i:=i+1; end loop; return i-1; end; ' language 'plpgsql'; you can call it by: select foo('{1232131,12312321,3424234}'); you should get 3. Jie LIANG Internet Products Inc. 10350

Re: [SQL] Search

2001-02-06 Thread Jie Liang
Hi, You seem want to match string insensitively, I guess. Try: ~* 'test' -- match Test|tEst|tESt ... ~* '.*test.*' -- match whateverTesTwhatever Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com

Re: [SQL] Use of RETURN in pl/pgsql function

2001-02-07 Thread Jie Liang
You may try like: if block end if; return somefakething; no matter this return can be reached or not. then compile will be no problem. Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com On Wed, 7

Re: [SQL] pgsql and cursor

2001-02-09 Thread Jie Liang
I just know you can use implict cursor inside the plpgsql e.g declare rec record; begin FOR rec IN select_clause LOOP statements END LOOP; end; Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL

Re: [SQL] What's wrong with this function

2001-02-09 Thread Jie Liang
I just know you can use implict cursor inside the plpgsql e.g declare rec record; begin FOR rec IN select_clause LOOP statements END LOOP; end; Jie LIANG St Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL

Re: [SQL] What's wrong with this function

2001-02-09 Thread Jie Liang
many songs of 'Najm Hashmi' in your database. Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Sat, 10 Feb 2001, Najm Hashmi wrote: Jie Liang wrote: I

Re: [SQL] String Concatnation

2001-02-09 Thread Jie Liang
Hi, You can use every sql function and operator in plpgsql, so v||''|''||v2 is OK. however, you cannot do: declare v,v2 text; you should do: v text; v2 text; also you initialize like: v text:=; Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100

Re: [SQL] constraint/restrict

2001-02-14 Thread Jie Liang
add an foriegn key on address(country_id), let country(id) be a primary key. Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Wed, 14 Feb 2001, Olaf Marc

Re: [SQL] createuser problem

2001-02-14 Thread Jie Liang
run this as user 'postgres' instead of 'fion' Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Tue, 13 Feb 2001, fion yong wrote: It gives the following

Re: [SQL] How to create a type ?

2001-02-14 Thread Jie Liang
/bombs mature humor pornography tasteless computer hacking nudity drugs lingerie/bikini profanity ... Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com

Re: [SQL] Datetime Query

2001-02-16 Thread Jie Liang
Try: SELECT request_no FROM request where status_code ='C' and (completed_date::date between '01/01/2000'::date and '01/01/2001'::date) actually date('01/01/2000') does same thing as '01/01/2000'::date Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite

Re: [SQL] Help Retrieving Latest Record

2001-02-16 Thread Jie Liang
Subquery will do: select * from basket where Date in (select max(Date) from basket); Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Fri, 16 Feb 2001

Re: [SQL] pl/Perl

2001-02-21 Thread Jie Liang
FYI, My choice: if involving a lot of regular expressions, pl/Perl is better; if involving a lot of SQLs or other functions(or store procedures), then pl/pgsql is better. Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office

Re: [SQL] Can a function return a record set?

2001-02-22 Thread Jie Liang
in plpgsql you've to use select field into a_variable from table where ...(single value return) or for record|row in select fields from table loop ... end loop; Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320

Re: [SQL] How can i escape a '+' or a '+' in a regexp ?

2001-02-23 Thread Jie Liang
select field from table where field like '%\\%%' or field like '%*%'; select field from table where field ~ '.*\\*.*' or ~ '.*%.*'; Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED

Re: [SQL] Need your help

2001-02-23 Thread Jie Liang
; ' LANGUAGE 'plpgsql'; CREATE TRIGGER emp_stamp BEFORE UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE emp_stamp(); Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com

Re: [SQL] Controlling Reuslts with Limit

2001-02-23 Thread Jie Liang
My understanding: because you return a subset instead of a single value, so between 2 select ... limit ... queries. if you delete a record(say song_id=947) then insert it again. then results are different. So for a multiple users db, you should use oder by when you use limit. Jie LIANG St

[SQL] Urgent help

2001-02-26 Thread Jie Liang
user added cannot retrive data from any table. what I can do?? Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Wed, 21 Feb 2001, Tom Lane wrote: Jie

Re: [SQL] Urgent help

2001-02-26 Thread Jie Liang
another weired thing is, when I: select * from pg_group; it takes about 2 minites to return, it took just a tick before, it seems that some sys tables has been locked for a timeout. Thanks. Jie LIANG St. Bernard Software Internet Products Inc. 10350 Science Center Drive Suite 100, San

Re: [SQL] Comparing dates

2001-03-06 Thread Jie Liang
I think if you cast it then works. e.g. '02-03-2001'::date '02-03-2001'::timestamp Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Tue, 6 Mar 2001, Markus Fischer wrote

Re: [SQL] Date question

2001-03-06 Thread Jie Liang
you can say: (now() + '1year'::timespan)::date Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Tue, 6 Mar 2001, Boulat Khakimov wrote: Hi, Im a little bit stuck here

[ADMIN] how to reload a function

2001-03-07 Thread Jie Liang
to re_create function B though no change to function B. Is there any way (sql stmt) let me re_load function B's defination without using drop and create?? Thanks. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED

Re: [SQL] pl/Perl

2001-03-14 Thread Jie Liang
'pltcl' HANDLER pltcl_call_handler LANCOMPILER 'PL/pgtcl'; 3.Where I can find more doc about pltcl? Thanks for your time. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED

Re: [SQL] drop table in PL/pgSQL

2001-03-23 Thread Jie Liang
You cannot CREATE|DROP ALTER table in PL/pgSQL, in general, plsql can only take DML(i.e. SELECT| INSERT|UPDATE..) Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Fri, 23 Mar

Re: [SQL] SOME PL/PGSQL PROBLEMS

2001-03-23 Thread Jie Liang
You blame something should not be blamed. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Fri, 23 Mar 2001, datactrl wrote: I found there are some problems with PL/pgSQL. 1

Re: [SQL] drop table in PL/pgSQL

2001-03-23 Thread Jie Liang
Hmm, I didn't know that, this general idea from Orcale plsql, So, I assume that you can SELECT somefield into a_new_table FROM a_old_table in pg 7.1??? Thank you. No DDL can be roll back. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858

Re: [SQL] About Raise Exception

2001-03-25 Thread Jie Liang
At least raise exception will abort the transaction but raise notice does not. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Mon, 26 Mar 2001, datactrl wrote: According

Re: [SQL] about raise exception

2001-03-25 Thread Jie Liang
Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Mon, 26 Mar 2001, Jack wrote: According to user guide, both Raise Notice Raise Exception will write message to database log

[SQL] using for rec inside a function: behavior very slow

2001-04-02 Thread Jie Liang
quick way to return match: where field like 'something%' inside the plsql function?? Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com ---(end of broadcast

[SQL] select statement inside a function: behavior bad

2001-04-02 Thread Jie Liang
Is it a bug?? Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http

[SQL] Does pg_dump stable on v7.0

2001-04-06 Thread Jie Liang
'*.net'::text)) AND (urlpart('host'::text, (url)::"varchar") '*.gov'::text)) AND (urlpart('host'::text, (url)::"varchar") '*.*'::text)) AND (urlpart('host'::text, (url)::"varchar") '*'::text))), PRIMARY KEY ("id") ); Ji

[ADMIN] select ... for update in plpgsql

2001-04-20 Thread Jie Liang
? or say begin...end in plpgsql can lock chosen rows until updated ALL ROWS? if not, do you have any suggestion? Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com

[SQL] plpgsql

2001-04-20 Thread Jie Liang
...end in plpgsql connot have same functionality as sql, how can I ensure my sql stmts go one transaction?? thanks. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com

Re: [SQL] plpgsql

2001-04-22 Thread Jie Liang
transaction done. do I need an explicit LOCK stmt? can it be used in the plpgsql function?? Thanks again. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Fri, 20 Apr 2001, Roberto

[SQL] random rows

2001-04-26 Thread Jie Liang
How I can return random N rows from my select stmt? like: e.g. what my selectee is a set of 1000 rows, I want randomly pickup 100 of 1000. thanks. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED

Re: [SQL] PL/Perl documentation ...

2001-05-02 Thread Jie Liang
http://www.brasileiro.net/postgres/ Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Wed, 2 May 2001, Adam Walczykiewicz wrote: Is there available some more examples

Re: [SQL] batch file

2001-05-25 Thread Jie Liang
Hi, I am not sure what's your question. However, you can list a bunch of SQL statements in a text file: e.g. myfile.sql which contains: select * from tablename where update tablename set ... where ... . then, you can just run it like: psql -q dbname myfile.sql Jie LIANG St

[SQL] FW: RESTORE A TABLE

2002-06-21 Thread Jie Liang
pg_restore -aRt mytable -d dbname mytable but this takes too long to restore. 2. Is any way to disable unique index checking when loading, then enable the index after restored? Jie Liang ---(end of broadcast)--- TIP 3: if posting/reading through

[SQL] pg_restore cannot restore function

2002-06-26 Thread Jie Liang
I use pg_dump -Fc mydb dbf then I create anpther db by: createdb mydb2 I use pg_restore -P myfunction -d mydb2 dbf cannot restore myfunction into mydb2 why?? Jie Liang ---(end of broadcast)--- TIP 3: if posting/reading through Usenet

Re: [SQL] pg_restore cannot restore function

2002-07-03 Thread Jie Liang
I am sure. I assume that pg_restore -t mytable -d mydb mydumpfile is same as pg_restore --table=mytable --dbname=mydb mydumpfile but it is not! the 2nd one will get: pg_restore: [archiver] could not open input file: No such file or directory Jie Liang -Original Message- From: Jan

Re: [SQL] pg_restore cannot restore function

2002-07-03 Thread Jie Liang
This is not the case, because those db on a same server, it's I dump data from one db and try restore one of it function into another db. Thanks for your response anyway. Jie Liang -Original Message- From: Achilleus Mantzios [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 12

Re: [SQL] pg_restore cannot restore function

2002-07-03 Thread Jie Liang
of pg_restore should be improved. Thanks. Jie Liang -Original Message- From: Jan Wieck [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 11:14 AM To: Jie Liang Cc: 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Re: [SQL] pg_restore cannot restore function Jie

[SQL] postgres7.2.1 upgrading

2002-07-03 Thread Jie Liang
that. Anybody can tell me? Thanks! Jie Liang ---(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

[SQL] pg_restore cannot restore index

2002-07-09 Thread Jie Liang
, -I is illegal option. Thanks! Jie Liang -Original Message- From: Jie Liang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 12:03 PM To: 'Jan Wieck'; Jie Liang Cc: 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Re: [SQL] pg_restore cannot restore function

Re: [SQL] pg_restore cannot restore index

2002-07-09 Thread Jie Liang
, -I is illegal option. Thanks! Jie Liang ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

Re: [SQL] pg_restore cannot restore index

2002-07-10 Thread Jie Liang
Thanks! But I did not make long form works also, is it: pg_restore --index=\indexname\ --dbname=mydb mydumpfile ??? msg: pg_restore:[archiver] could open input file: No such file or directory could you give out a example of long form Thanks again. Jie Liang -Original

Re: [SQL] pg_restore cannot restore index

2002-07-11 Thread Jie Liang
On this point, I'd like to ask: 1. where I can download this new version? 2. does pg_restore --index=aa --dbname=test /bjm/x works also??? Because pg_restore --table=mytable --dbname=mydb mydumpfile doesn't work! I got same error msg. Jie Liang -Original Message- From: Bruce Momjian

Re: [SQL] pg_restore cannot restore index

2002-07-11 Thread Jie Liang
What parameter I should change in order to make postmaster taking CPU as much as possible? Maybe I should ask: how can I make big tables equijoin faster? I have a serveral tables that contain more 2.5 million records, I need to equijoin those tables often. Thanks! Jie Liang

Re: [SQL] Please, HELP! Why is the query plan so wrong???

2002-07-11 Thread Jie Liang
I believe that SQL will use the index of join 'key' when you join the tables if have any, in your query the (a,c) is the join key but d is not. Jie Liang -Original Message- From: Dmitry Tkach [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 3:51 PM To: [EMAIL PROTECTED

Re: [SQL] Please, HELP! Why is the query plan so wrong???

2002-07-12 Thread Jie Liang
please copy and paste the whole msg and your query! Note:what I mean ' join key' is the fields that link two tables. I don't think fb.b=0 is a join key! Jie Liang -Original Message- From: Dmitry Tkach [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 7:34 AM To: Jie Liang Cc

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Jie Liang
Same problem, did you test: pg_restore --index=aa --dbname=test /bjm/x ?? I didn't make it work, I may miss someting. Thanks! Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 7:51 AM To: Jie Liang Cc: 'Jan Wieck'; '[EMAIL

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Jie Liang
su postgres -c /usr/local/pgsql/bin/pg_restore --table=mytable --dbname=mydb mydumpfile error msg pg_restore: [archiver] could not open input file: No such file or directory I run it on 7.2.0 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday

[SQL] how pg_restore long form works?

2002-07-15 Thread Jie Liang
su postgres -c /usr/local/pgsql/bin/pg_restore --table=mytable --dbname=mydb mydumpfile error msg pg_restore: [archiver] could not open input file: No such file or directory I run it on 7.2.0 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday

[SQL] pg_restore --flag

2002-07-15 Thread Jie Liang
I tried, I got same error msg. I even run as user postgres or myself, same same. My OS=FreeBSD4.3 DB=PostgreSQL7.2 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 4:25 PM To: Jie Liang Cc: 'Jan Wieck'; '[EMAIL PROTECTED

[SQL] schedule of v7.3

2002-10-02 Thread Jie Liang
Bruce, What is the schedule for releasing v7.3 stable? Oct? Thanks. Jie Liang ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

[SQL] server terminated by a query in 7.3

2002-12-13 Thread Jie Liang
Tom, I've a perl script, which has been used for a long time, it works well, however, after I upgrade my postgresql from 7.2 to 7.3, one query always makes server terminated, could you give me a solution for it? Thanks. Jie Liang SELECT urlinfo.id,url,iprism_map,iprism_map_sg,level,domid, CASE

Re: [SQL] server terminated by a query in 7.3

2002-12-13 Thread Jie Liang
Maybe you did a patch in localbuff.c to fix that vacuuming temp table? Jie liang -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 10:12 AM To: Jie Liang Cc: [EMAIL PROTECTED]; '[EMAIL PROTECTED]' Subject: Re: server terminated by a query

[SQL] pg_restore cannot restore an index

2003-01-16 Thread Jie Liang
Last July, I pointed out this problem when I use v7.2.1, I got the answer that will be resolved in v7.3, however, I am using v7.3.1, pg_restore.c seems have no change in this section. So it still doesn't work. Jie Liang Jie Liang wrote: I read the pg_restore.c source code, I found: #ifdef

Re: [SQL] pg_restore cannot restore an index

2003-01-16 Thread Jie Liang
Sorry, it because I have another index with same indexname because pg_restore index fail. Thanks. Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 10:07 AM To: Jie Liang Cc: Tom Lane; [EMAIL PROTECTED] Subject: Re: [SQL

[SQL] \df

2004-05-07 Thread Jie Liang
Hi, What sql statement equal to \df function_name I want to know the result data type for a given function within plpgsql. Thanks. Jie Liang ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

Re: [SQL] \df

2004-05-07 Thread Jie Liang
Thanks. Jie Liang -Original Message- From: Stefan Weiss [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 4:40 PM To: [EMAIL PROTECTED] Subject: Re: [SQL] \df On Saturday, 08 May 2004 01:15, Jie Liang wrote: What sql statement equal to \df function_name I want to know the result

Re: [SQL] \set

2004-05-12 Thread Jie Liang
it in my SQL query? Thanks anyway. Jie Liang -Original Message- From: Christian Kratzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 3:13 AM To: Jie Liang Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [SQL] \set Hi, On Tue, 11 May 2004, Jie Liang wrote: Hi, How to use

  1   2   >