[GENERAL] blank in query - cannot return results

2015-10-08 Thread Emi
Hello, PostgreSQL 8.3.18 on x86_64-linux-gnu, query: select * from table_name where col1 ='Abc, test'; select * from table_name where col1 ilike '%Abc, test%'; NO result returned. But run: select * from table_name where col1 ilike '%Abc,%test%'; -- remove blank Result is returned.

Re: [GENERAL] blank in query - cannot return results

2015-10-08 Thread Emi
Hello, PostgreSQL 8.3.18 on x86_64-linux-gnu, query: select * from table_name where col1 ='Abc, test'; select * from table_name where col1 ilike '%Abc, test%'; NO result returned. But run: select * from table_name where col1 ilike '%Abc,%test%'; -- remove blank Result is returned.

[GENERAL] Simple way to load xml into table

2015-10-15 Thread Emi
Hello, For psql 8.3, is there a simple way to load xml file into table please? E.g., True test1 e1 false test2 Results: t1 (c1 text, c2 text, c3 text): c1| c2 | c3 - true| test1 | e1 false | test2 | null .. Tha

[GENERAL] drop index without accessexclusivelock in transaction (JAVA)

2015-11-18 Thread Emi
Hello, Through java jdbc, is it possible that we do the following steps without accessexclusivelock for index: setautocommit(false); drop index1, 2,; insert millions records set index1,2... commit; Found this post, but it says only within psql block begin/commit, users are able to do it

[GENERAL] org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command

2017-08-02 Thread Emi
Hello, Running psql table updates() by using org.springframework.scheduling.quartz.JobDetailFactoryBean cronjob from web application. Got the following exception: org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command Re-run the same cronjob several

[GENERAL] Check whether two strs have at least one shared character.

2007-07-03 Thread Emi Lu
Hello, Is there a simple way/command/function to check whether two strings have at least one overlap character please? For example, str1: 05baaa str2: ooboo Query: select str1 ??? str2 ; Result: true Because b is in both str1 and str2. Thank you! ---(end of broadc

[GENERAL] Date for a week day of a month

2007-07-03 Thread Emi Lu
Hello, Can I know how to get the date of each month's last Thursday please? For example, something like Query: select getDateBaseOnWeekday('2007-04-01', 'Last Thursday'); Result: 2007-04-26 Thank you! ---(end of broadcast)--- TIP 1: if posting/

Re: [GENERAL] Date for a week day of a month

2007-07-03 Thread Emi Lu
Thank you all for your inputs! Based on your inputs, made it a bit change to my application: == DROP FUNCTION test_db.lastWeekdayDate (date, varchar) ; CREATE OR REPLACE FUNCTION test_db.lastWeekdayDate (dat

Re: [GENERAL] Date for a week day of a month

2007-07-04 Thread Emi Lu
generate_series that's a good one! Thank you! On 7/3/07, Emi Lu <[EMAIL PROTECTED]> wrote: Can I know how to get the date of each month's last Thursday please? Query: select getDateBaseOnWeekday('2007-04-01', 'Last Thursday'); Result: 2007-04-26 yo

[GENERAL] Dump all objects under a specific schema

2007-08-08 Thread Emi Lu
Hello List, Is there a way that I can only dump all objects under a specific schema? I'd like to dump all tables, views' definition and data under a specific schema. Thank you! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] resizing a varchar column on 8.3.8

2011-01-27 Thread Emi Lu
On 01/15/2011 04:22 PM, Jon Hoffman wrote: Hi, I found a post with some instructions for resizing without locking up the table, but would like to get some re-assurance that this is the best way: http://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data How does

Re: [GENERAL] read and restore deleted record

2011-02-15 Thread Emi Lu
Start from vacuum feature information from PGSQL helps documentation, it telling me that Postgresql didn’t delete data permanently when we execute delete command, it just made the data invalid. By following this email archive : http://archives.postgresql.org/pgsql-admin/2005-01/msg00176.php I

[GENERAL] pdf saving into DB vs. saving file location ?

2011-03-23 Thread Emi Lu
Hello list, A question about saving PDF (size around 160kb) into postgresql large object columns vs. saving into a directory. May I know the performance differences? Pros and crons please? Each year, 20 new pdfs will be saved into DB (each around 160KB). Thanks a lot! Emi -- Sent via pgsql

[GENERAL] dblink server closed the connection unexpectedly - Exception

2011-04-06 Thread Emi Lu
ver was lost. Attempting reset: Failed. !> Note: "sql>" is changed to "i>" When re-start database server, the error disappear automatically. Could someone let me what may cause this exception please? Thanks alot! -- Emi -- Sent via pgsql-general mailing list (pgsql

[GENERAL] Fwd: dblink server closed the connection unexpectedly - Exception

2011-04-06 Thread Emi Lu
et dbname=abc connect_timeout=10’); Port is open DETAIL: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request In a real example, how do I interpret this? Still what may cause "Port is open" exception?

[GENERAL] alter column to varchar without view drop/re-creation

2014-08-29 Thread Emi Lu
to varchar and no date/numeric changes. Thanks a lot! Emi --- PostgreSQL 8.3.18 on x86_64

Re: [GENERAL] alter column to varchar without view drop/re-creation

2014-08-29 Thread Emi Lu
Hello list, May I know is there a way to "alter column type to varchar" (previous is varchar(***)) without view drop/re-creation? Basically, looking for a way to change column without have to drop/re-create dependent views.

Re: [GENERAL] alter column to varchar without view drop/re-creation

2014-08-29 Thread Emi Lu
? As for the "definitely test", you mean check view after the change? Would there be any other potential problems for this approach? If not, I will adopt this approach since we have many view dependencies and it seems that this was the best way to avoid view drop/re-creation for now. If there are other ways, please do let me know. Thanks a lot! Emi

Re: [GENERAL] alter column to varchar without view drop/re-creation

2014-09-02 Thread Emi Lu
ther way I know to do this is to: BEGIN; DROP VIEW some_view ; ALTER TABLE some_table ALTER COLUMN some_col TYPE new_type; CREATE OR REPLACE VIEW some_view SELECT * FROM some_table; COMMIT; Comparing with the pg_attribute action, this approach would be the last one since there are too many view depe

[GENERAL] drop/create/alter amongst difference schemas as non-super user

2014-09-03 Thread Emi Lu
schema1.v1; \c - schema2; create schema2.v2; commit; This way the commit would complain and have to type pwd for diff schema owners. Is there a better way of doing this? Thanks a lot! Emi -- Note: . Views need to be created under difference schemas and created by that schema owner for now

[GENERAL] FATAL: terminating connection due to administrator command

2014-09-16 Thread Emi Lu
ion due to administrator command"? Thanks a lot! Emi

[GENERAL] which Update quicker

2014-09-23 Thread Emi Lu
pk and t1.c_N <> a.c_N; (2) update t1 set c1 = a.c1 , c2 = a.c2, ... c_N = a.c_N from a where pk AND ( t1.c1 <> a.c1 OR t1.c2 <> a.c2. t1.c_N <> a.c_N) Or other quicker way for

[GENERAL] question

2014-10-06 Thread Emi Lu
rent_query   --                     Thanks a lot! Emi

[GENERAL] org.postgresql.copy.CopyManager which JDBC version ?

2014-10-10 Thread Emi Lu
Hello, May I know from which version of psql JDBC driver, it provides "org.postgresql.copy.CopyManager" please? postgresql-8.3-605.jdbc4.jar does not have this class. Thanks a lot! Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

[GENERAL] CopyManager(In/out) vs. delete/insert directly

2014-10-16 Thread Emi Lu
(2) setautoCommit(false); delete t2 where pk.cols in t1; insert t2 select * from t1; Thank you Emi

[GENERAL] spring a string to rows (Postgresql 8.4)

2013-01-07 Thread Emi Lu
Hello, Is there a function to split a string to different rows? For example, t1(id, col1) values(1, 'a, b, c'); select id, string_split_to_row(col1, ','); Return: = 1, a 1, b 1, c Thanks alot! Emi -- Sent via pgsql-general mailing list (pgsql-general@pos

[GENERAL] Grant - create schema permission for a user

2013-03-08 Thread Emi Lu
Good morning, I am looking for the command to grant create schema permission for a user. Thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How can I look at a recursive table dependency tree?

2009-05-29 Thread Emi Lu
A. Kretschmer wrote: In response to Igor Katson : I want to DROP CASCADE a table, but I am afraid that amoung numerous recursive dependencies there will be smth, that I don't want to drop. Is there a way to watch all dependencies recursively without doing a drop? You can walk through pg_depe

[GENERAL] Change view definition - do not have to drop it

2009-06-02 Thread Emi Lu
Original view1 (col1 bpchar, col2 varchar). Now I need update view1 definition to create or replace view view1 as select col1, col2 from new_table; However, col1 in new_table is not bpchar. This gives me headache! There are tens of dependent views based on view1, so I cannot just drop view1 an

Re: [GENERAL] Change view definition - do not have to drop it

2009-06-02 Thread Emi Lu
Now I need update view1 definition to create or replace view view1 as select col1, col2 from new_table; However, col1 in new_table is not bpchar. This gives me headache! There are tens of dependent views based on view1, so I cannot just drop view1 and recreate it. How I can redefine view1

Re: [GENERAL] Graphical representation of query plans

2009-09-22 Thread Emi Lu
Grzegorz Jaśkiewicz wrote: pgadmin does it pretty nicely: http://pgadmin.org/images/screenshots/pgadmin3_macosx.png As shown in the mackintosh version, it is a very nice and helpful feature! I have pgadmin 1.2.0 for PostgreSQL 8.0.15 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2.

Re: [GENERAL] Graphical representation of query plans

2009-09-23 Thread Emi Lu
pgadmin does it pretty nicely: http://pgadmin.org/images/screenshots/pgadmin3_macosx.png As shown in the mackintosh version, it is a very nice and helpful feature! I have pgadmin 1.2.0 for PostgreSQL 8.0.15 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2. I did not see this "explain" in

[GENERAL] Alter column with views depended on it without drop views

2014-03-19 Thread Emi Lu
. Thanks a lot! Emi -- PostgreSQL 8.3.18 on x86_64-unknown-linux-gnu -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] How to realize ROW_NUMBER() in 8.3?

2011-04-20 Thread Emi Lu
Hello, ROW_NUMBER() is only ready in 8.4. For 8.3, is there a simple way to get row_number select row_number(), col1, col2... FROM tableName Thanks a lot! 丁叶 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.or

[GENERAL] 500KB PDF saving into large object , what is the table size?

2011-05-18 Thread Emi Lu
Hello, A question about large object column type in postgresql8.3. A pdf file=500KB. If saving into large object column, will the table size be around 500KB? If larger than 500KB, what could be the proximate size? Thanks a lot! Emi -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] Re: 500KB PDF files for postgresql8.3, which is the most efficient way?

2011-05-27 Thread Emi Lu
(2) Save oids of pdfs into table (3) Save pdf files as bytea column in psql8.3 Pros and cons for (1), (2), (3), which is the most efficient way? Thanks a lot! Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

[GENERAL] 500KB PDF files for postgresql8.3, which is the most efficient way?

2011-05-27 Thread Emi Lu
Pros and cons for (1), (2), (3), which is the most efficient way? Thanks a lot! Emi On 05/27/2011 12:45 AM, Jasen Betts wrote: On 2011-05-26, Bosco Rama wrote: select * into temp table foo from maintable where primcol=123; update foo set primcol = 456; insert into maintable s

[GENERAL] "postgresql-9.0-801.jdbc4.jar" always cause "org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled" Exception

2011-05-31 Thread Emi Lu
transaction. Cause: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled. While for "8.4-702 JDBC 4", the same codes, no error at all. Is this a bug for "postgresql-9.0-801.jdbc4.jar"? Thanks a lot! Emi -- Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] "postgresql-9.0-801.jdbc4.jar" always cause "org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled" Exception

2011-05-31 Thread Emi Lu
ing upon the driver to do it for you; though there are always exceptions but you should code is so that you can request an auto-commit session when you know you need one. Exactly. I need to know in spring3.0.5 + mybatis + jdbc9 where to setup autocommit= false. For spring3.0.5 + mybatis + jdbc8, the

[GENERAL] ERROR: malformed record literal: "",DETAIL: Missing left parenthesis?

2011-07-06 Thread Emi Lu
PREPARE test(z_drop) AS INSERT INTO z_drop VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21) ; EXECUTE test('', '1', '1', '1', '1', '1', '1', '1', '1

[GENERAL] Simple method to format a string?

2012-06-20 Thread Emi Lu
Good morning, Is there a simply method in psql to format a string? For example, adding a space to every three consecutive letters: abcdefgh -> *** *** *** Thanks a lot! Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: h

Re: [GENERAL] Simple method to format a string?

2012-06-20 Thread Emi Lu
conforming_strings. For example: E'\\& ' After combined with several more replace(s), regexp_replace will provide me the expecting result. Thanks! Emi -- select regexp_replace( replace( replace(col-val, ' ', ''), '-', ''),

Re: [GENERAL] Great site for comparing databases (or anything else)

2012-12-06 Thread Emi Lu
ue. I saw lots of discussion about the results shown in the website. I would say that it is always good to have something to start with. And I vote for it. -- Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Emi Lu
Good morning, Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? Thanks a lot! Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Emi Lu
Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? JAVA codes work for most of characters, but not "-È". Someone knows why the following codes cannot load "-È" to mysql@latin1? Thanks a lot! -- public static String utf8_to_latin1(String str) thro

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Emi Lu
target database. The JDBC drivers will handle all the conversion. Do NOT manually convert the data. getString() and setString() will do everything correctly. I am not using stmt directly but through Mybatis for all db transactions. So, this approach will not work. Thanks. -- Emi -- Sent via

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Emi Lu
d not be mapped correctly in (2). I was thinking that psql may have methods could help this. But it seems that I have to try from java coding side :-( -- Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpr

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
d "jdbc:mysql://.../mysql_db?...unicode...encoding...=ISO..." No. This does not work. For now, through the following method, all letters are correctly transformed except "È". What does OP stand for? Emi -- public static String utf8_to_latin1(String str) throws Exce

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
ransformed correctly. Thanks alot! Emi -- public static String utf8_to_latin1(String str) throws Exception { try { if(str.indexOf("È")>=0) { str = str.replaceAll("È", "E"); } byte[] conv

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
em specifically, I suspect they are using >> your default system encoding - so both may be using utf8 or iso8859. Thank you very much for all of your help for this! Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
On 12/14/2012 01:37 PM, Emi Lu wrote: Hello All, Meh. That character renders as \310 in your mail, which is not an assigned code in ISO 8859-1. The numerically corresponding Unicode value would be U+0090, which is an unspecified control character. Oh, scratch that, apparently I can't d

[GENERAL] Temporally disabled foreign key constraint check?

2011-10-21 Thread Emi Lu
Good morning, Is there a way to temporally disabled foreign key constraints something like: SET FOREIGN_KEY_CHECKS=0 When population is done, will set FOREIGN_KEY_CHECKS=1 Thanks a lot! Emi -- Emi Lu, ENCS, Concordia University, Montreal H3G 1M8 em...@encs.concordia.ca+1 514 848

Re: [GENERAL] Temporally disabled foreign key constraint check?

2011-10-21 Thread Emi Lu
Thank you first. I believe that upate pg_class can only be done by superuser, right? Besides, if I need the whole schema's foreign keys to be disabled and then enabled later. Is there a simple command could do it? Similar to mysql's "set FOREIGN_KEY_CHECKS = false/true&qu

[GENERAL] Simple way to get missing number

2012-04-24 Thread Emi Lu
Good morning, May I know is there a simple sql command which could return missing numbers please? For example, t1(id integer) values= 1, 2, 3 500 select miss_num(id) from t1 ; Will return: === 37, 800, 8001 Thanks a lot! Emi -- Sent via pgsql-general mailing

Re: [GENERAL] Simple way to get missing number

2012-04-24 Thread Emi Lu
Aha, generate_series, I got it. Thank you very much!! I also tried left join, it seems that left join explain analyze returns faster comparing with except: select num as missing from generate_series(5000, 22323) t(num) left join t1 on (t.num = t1.id) where t1.id is null limit 10; Emi On

Re: [GENERAL] [SQL] Simple way to get missing number

2012-04-24 Thread Emi Lu
I got it and thank you very much for everyone's help!! It seems that "left join where is null" is faster comparing with "except". And my final query is: select num as missing from generate_series(5000, #{max_id}) t(num) left join t1 on (t.num = t1.id) where t1.i

[GENERAL] What may cause - Connection rejected: FATAL: Ident authentication failed for user?

2009-04-22 Thread Emi Lu
Good morning, My daily data population cronjob(around 1 hour) terminated at the middle and raised the following error this morning: Connection rejected: FATAL: Ident authentication failed for user "schema_owner_name". Could anyone tell me what might cause the problem please? Thanks a lot!

Re: [GENERAL] What may cause - Connection rejected: FATAL: Ident authentication failed for user?

2009-04-28 Thread Emi Lu
My daily data population cronjob(around 1 hour) terminated at the middle and raised the following error this morning: Connection rejected: FATAL: Ident authentication failed for user "schema_owner_name". Could anyone tell me what might cause the problem please? This does not seem logical. ide

[GENERAL] Question about Foreign key constraint causes "costly sequential scans"?

2005-08-23 Thread Emi Lu
(col3) REFERENCES B(colB1) But I got a warning msg from postgresql as: foreign key constraint "Aclo3_fk" will require costly sequential scans Some comments about it? Thanks a lot! Emi ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Question about Foreign key constraint causes "costly

2005-08-23 Thread Emi Lu
Thanks a lot for all helps. I do not have warnings anymore :-) I'd like to setup foreign key constraint for A.col3, as the following: CONSTRAINT Aclo3_fk FOREIGN KEY (col3) REFERENCES B(colB1) But I got a warning msg from postgresql as: foreign key constraint "Aclo3_fk" will require costly

[GENERAL] About column type to "varchar(1)" or "char(1)"

2005-08-24 Thread Emi Lu
char(1)" does not matter at all? Thanks a lot, Emi ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] About "ERROR: must be *superuser* to COPY to or from a file"

2005-08-26 Thread Emi Lu
PY as well? Thanks a lot and Good weekend, Emi ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Questions about "varchar" NOT NULL default = char(1) ?

2005-09-15 Thread Emi Lu
Greetings, If one column "col1" is defined as : col1 varchar(1) not null default '' Does it means that col1's definition is equal to col1 char(1) not null default '' Put it another way, will char '' be saved as char(1) or char '

[GENERAL] Neither column can be NULL if the column is part of the combination of primary key columns?

2005-09-16 Thread Emi Lu
" automatically right? (Although, I did not specify not null constraint for col2) To allow *col2* to be NULL and make record combination (col1, col2) unique, I should setup unique (col1, col2) ? Thanks, Emi ---(end of broadcast)--- TIP 1

[GENERAL] Questions about Rollback - after insert, update, delete ... operations?

2005-09-22 Thread Emi Lu
delete ... ... update ... ... /* If any of the above operation failed, we can rollback all the above operations? */ rollback ... ... end Will all "Insert, delete, update" operations rollback if any of the operations fails? Thanks a lot! Emi

Re: [GENERAL] Questions about Rollback - after insert, update,

2005-09-22 Thread Emi Lu
data are not rollback. Your inputs are very welcomed! On Thu, 2005-09-22 at 14:20, Emi Lu wrote: greetings, I remembered I read something in the mailing list about "*rollback*" a while ago. People mentioned that some operations cannot rollback. I cannot remember what kinds of

Re: [GENERAL] Questions about Rollback - after insert, update,

2005-09-22 Thread Emi Lu
result, step1 & step2 runs successfully in Database, while step3 failed. Also, rollback failed? On Thu, 2005-09-22 at 14:59, Emi Lu wrote: We are using (struts) ibates to run the transaction. We already setup autocommitte = false, and put insert, update, delete into one transaction. How

[GENERAL] Get all table names that have a specific column

2005-09-30 Thread Emi Lu
les/views, I can get the result something like : tables contain column "col1" - t1 t2 (2 rows) Thanks a lot, Emi ---(end of broadcast)--- TIP 4: Have you searched our list

[GENERAL] Looking for GUI for pg_dump/pg_restore under windows XP/2003 OS

2005-10-07 Thread Emi Lu
Greetings, I am looking for a tool that provides interface for pg_dump/pg_restore under windows OS. PgAdminII seems a bit slow, could someone suggests some any tools that are quick at dumping and restore data through the GUI please? Thanks a lot, Emi ---(end of

[GENERAL] About transform SQL grammar from postgresql 8.0 to mysql 3.0

2005-10-11 Thread Emi Lu
looking for some existing scripts that can change postgresql SQL grammar (E.g., filtering "set search_path") into the ones supported by mysql 3.0? Thanks a lot! Emi ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] About postgreSQL database Synchorization

2005-10-18 Thread Emi Lu
Hello all, Could someone suggest some online documents/links about postgreSQL DB synchronization please? Thanks a lot, Emi ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] About postgreSQL database Synchorization

2005-10-18 Thread Emi Lu
Thanks all. They are very helpful! - Emi Emi Lu wrote: Hello all, Could someone suggest some online documents/links about postgreSQL DB synchronization please? What is "DB synchronization"? Are you talking about replication? PDF discussion by Bruce http://candle.pha.

[GENERAL] Where is the webaddress for the most recent postgresql version?

2005-10-26 Thread Emi Lu
Good morning, May I know the link/web address where I can get the most recent postgresql version information please? I'd love also to get the online manual address about updating old version to the new one and the patches. Thanks a lot, Emi ---(end of broa

[GENERAL] About not to see insertion result "INSERT 0 1"

2005-11-21 Thread Emi Lu
splayed by postgreSQL. Is there a way to hide the output "INSERT 0 1" generated by postgresql ? Thanks a lot! Emi ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] About not to see insertion result "INSERT 0 1"

2005-11-21 Thread Emi Lu
Thanks a lot! That is exactly what I want. - Emi On Mon, 21 Nov 2005, Emi Lu wrote: Is there a way to hide the output "INSERT 0 1" generated by postgresql ? Use psql with -q. Regards, - -- Devrim GUNDUZ Kivi Bilişim Teknolojileri - http://www.kivi.com.tr devrim~gunduz.o

[GENERAL] Load a csv file into a pgsql table

2006-09-19 Thread Emi Lu
Greetings, *Except* copy command, are there other quick ways to load data from a csv file into a pgsql table please? Thanks a lot! ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Load a csv file into a pgsql table

2006-09-19 Thread Emi Lu
/IT Systems Engineer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emi Lu Sent: Tuesday, September 19, 2006 2:15 PM To: PgSQL General Subject: [GENERAL] Load a csv file into a pgsql table Greetings, *Except* copy command, are there other quick ways to load data fro

[GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Emi Lu
HEllo, I am looking for a psql method to get the bigger value of two numbers. For example, methodName(12.6, 3.8) Will return 12.6 Thanks! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Emi Lu
I am looking for a psql method to get the bigger value of two numbers. For example, methodName(12.6, 3.8) select greatest(12.6,3.8); It does not work for me, select greatest(12.6,3.8); ERROR: function greatest(numeric, numeric) does not exist HINT: No function matches the given name and

Re: [GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Emi Lu
Emi Lu wrote: I am looking for a psql method to get the bigger value of two numbers. For example, methodName(12.6, 3.8) select greatest(12.6,3.8); It does not work for me, select greatest(12.6,3.8); ERROR: function greatest(numeric, numeric) does not exist HINT: No function matches

[GENERAL] postgresql 8.2 Installation error at "gmake"

2007-02-15 Thread Emi Lu
Hello, Tried to install 8.2, configuration passed, but when running "gmake", got the following error, any clues? Thanks a lot! Step1 ./configure --prefix=/local/postgresql --datadir=/postgreSQL_data --without-docdir --without-readline --disable-spinlocks --without-zlib PASS! St

Re: [GENERAL] postgresql 8.2 Installation error at "gmake"

2007-02-15 Thread Emi Lu
Hello, Tried to install 8.2, configuration passed, but when running "gmake", got the following error, any clues? Please provide more details -- what operating system is this? i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2 Step1 ./configure --prefix=/local/postgresql --datadir

Re: [GENERAL] postgresql 8.2 Installation error at "gmake"

2007-02-15 Thread Emi Lu
Tried to install 8.2, configuration passed, >>> but when running "gmake", got the following error, any clues? Step1 ./configure --prefix=/local/postgresql --datadir=/postgreSQL_data --without-docdir --without-readline --disable-spinlocks --without-zlib Please note that --datad

Re: [GENERAL] postgresql 8.2 Installation error at "gmake"

2007-02-15 Thread Emi Lu
Hello, Do you happen to have a previous installation at /local/postgresql? I think the presence of an older libpgport.a there could be causing the confusion. (1) \rm -r /local/postgresql (2) ./configure --prefix=/local/postgresql --without-docdir --without-readline --without-zlib The

Re: [GENERAL] postgresql 8.2 Installation error at "gmake"

2007-02-15 Thread Emi Lu
Tried to install 8.2, configuration passed, but when running "gmake", got the following error, any clues? Please provide more details -- what operating system is this? i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2 Step1 ./configure --prefix=/local/postgresql --datadir=/postgreSQ

Re: [GENERAL] postgresql 8.2 Installation error at "gmake"

2007-02-15 Thread Emi Lu
Hello, Configure will work anyway without the --disable-spinlock; you're wasting your time with that option. Anyway, please note that your linker problem does not seem to be related to any of these options. Do you happen to have a previous installation at /local/postgresql? I think the presen

[GENERAL] When it is better to use "timestamp without time zone"?

2006-01-03 Thread Emi Lu
ot; ? And when it is better to use "timestamp with time zone"? Thanks a lot! Emi ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] When it is better to use "timestamp without time zone"?

2006-01-04 Thread Emi Lu
es, timestamp with time zone is a MUST; otherwise, timestamp without time zone is used? Emi ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] When it is better to use "timestamp without time zone"?

2006-01-04 Thread Emi Lu
lect * from test1 from client machine2, we will get "2006-01-04 10:01:01-05" since the absolute value is saved, which is never caculated again? . What is the problem here when the column type is setup as "timestamp without time zone"? The value "2006-01-04 10:01:01&q

[GENERAL] Vacuum all tables unders under one schema (not under one database)

2006-01-09 Thread Emi Lu
Greetings, I'd like to vacuum all tables under a specific schema. Instead of specifying tables one by one under the schema (not one Database), is there a simple way to do it? Thanks and have a nice weekend, Emi ---(end of broadcast)---

[GENERAL] lists all users under groups

2006-01-16 Thread Emi Lu
u6 Thanks a lot! Emi ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] lists all users under groups

2006-01-16 Thread Emi Lu
Hello, By using -E to see the outputs, figure out a way by myself: select distinct g.groname, u.usename from pg_catalog.pg_user u, pg_catalog.pg_group g WHERE u.usesysid = ANY(g.grolist) order by groname, usename; Do you have a simpler way such as \d??? Thanks, Emi Greetings, May I

[GENERAL] About Full-text searching under postgresql

2006-01-17 Thread Emi Lu
Hi, Could someone suggest some links/online docs about how postgreSQL supporting full-text searching please? Thanks a lot, Emi ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] performance about trigger (after insert, update, delete)

2006-02-03 Thread Emi Lu
is run and values are saved into track table automatically. I'd like to know the performance about the above way for tracking table values updates. Your comments are very welcomed. Emi ---(end of broadcast)--- TIP 1: if posting/reading

[GENERAL] SESSION_USER vs. CURRENT_USER

2006-02-06 Thread Emi Lu
Hello, Could someone clues me in the differences between SESSION_USER and CURRENT_USER please? Emi ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] About CASE Studio - generate SQL output (how to link tablespace to table definition)

2006-02-09 Thread Emi Lu
es. For example, " ... primary key (***) using tablespace fis_index" , "unique constraint using tablespace fis_index", etc. Also, please clue me in how feasible the SQL outputs generated by CASE Studio? I mean do you think it can generate what you expect from you

Re: [GENERAL] About CASE Studio - generate SQL output (how to link

2006-02-09 Thread Emi Lu
I saw the online doc mentioned that it supports tablespace for oracle and db2, but does it supports tablespace for postgresql 8.0 as well? http://www.casestudio.com/enu/ver219.aspx - Emi Does anybody have the experiences of using "CASE Studio" ? I used CASE Studio 2.2.1,and it he

Re: [GENERAL] Tool

2006-02-10 Thread Emi Lu
Could you suggests some tools that do not have to be super users to install it under Linux ? - Emi Thanks I am using pgadmin for development. I'm looking for a tool with which I can develop an interface that will be used for entering and accessing information in context with the user

[GENERAL] Get affected table name in trigger function?

2006-02-13 Thread Emi Lu
Hello, Is it possible to get current table name such as (TG_TABLENAME?) in a trigger function? For example, tables t1, t2, t3 all depend on one trigger function. In the trigger function, is it possible to get the current affected table name - is it t1, t2 or t3 ? Thanks a lot, Emi

[GENERAL] switch / case in plpgsql functions

2006-02-14 Thread Emi Lu
Hello, May I know whether plpgsql supports "switch / case " or I have to use IF /ELSIF please? Thanks, Emi ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command

  1   2   >