Re: [GENERAL] Prefix search on all hstore values

2013-11-28 Thread Albert Chern
Thanks for the suggestions! My requirements can be relaxed to full text search, but the problem I had with that approach is I have strings in Chinese, and postgres doesn't seem to support it. Calling to_tsvector() on Chinese characters always returns an empty vector. A separate table will

[GENERAL] Prefix search on all hstore values

2013-11-27 Thread Albert Chern
in the hstore? From reading the documentation the closest I've gotten is a gin index after converting the values to an array, but that doesn't seem to work with prefix searching. Any pointers would be much appreciated! Thanks, Albert

[GENERAL] Please Post

2012-07-11 Thread Gregorio, Albert
I am working with PostgreSQL 9.1.3 - I setup a master and standby - Initiated replication and verified that it was occurring - Failed over from master to standby and verified that the database could be updated on the new master - I then configured the former standby as a master, the former master

[GENERAL] Trigger.. AFTER and BEFORE with specific column changed

2012-04-01 Thread Albert
*I'm trying to follow this :* CREATE TRIGGER check_update *BEFORE* UPDATE ON accounts FOR EACH ROW WHEN (OLD.balance IS DISTINCT FROM NEW.balance) EXECUTE PROCEDURE check_account_update(); *but with AFTER instead of BEFORE. and I'm keep getting error on or near WHEN. does that

Re: [GENERAL] Trigger.. AFTER and BEFORE with specific column changed

2012-04-01 Thread Albert
*i get:* Syntax error at or near 'WHEN' LINE 1: ... check_update AFTER UPDATE ON accounts FOR EACH ROW WHEN (OLD.balance IS DISTINCT FROM NEW.balance) -- View this message in context:

[GENERAL] PostgreSQL Trigger and rows updated

2012-03-31 Thread Albert
am trying to update a table according to this trigger : CREATE TRIGGER alert AFTER UPDATE ON cars FOR EACH ROW EXECUTE PROCEDURE update_cars(); Trigger Function : CREATE FUNCTION update_cars() RETURNS 'TRIGGER' AS $BODY$ BEGIN IF (TG_OP = 'UPDATE') THEN

Re: [GENERAL] PostgreSQL Trigger and rows updated

2012-03-31 Thread Albert
Thanks you so much! it works great now -- View this message in context: http://postgresql.1045698.n5.nabble.com/PostgreSQL-Trigger-and-rows-updated-tp5608591p5609895.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list

Re: [GENERAL] user get notification when postgresql database updated

2012-03-30 Thread Albert
another Q : my app should display notifications to each user depends on his selected cars. can i do that just using ajax and php ? -- View this message in context: http://postgresql.1045698.n5.nabble.com/user-get-notification-when-postgresql-database-updated-tp5600187p5606001.html Sent from the

Re: [GENERAL] user get notification when postgresql database updated

2012-03-29 Thread Albert
Thanks for your response! it a browser based application. so would you advice me about the best way to poll the database for notifications ? I've been read about DB triggers but still can't tell if it will help me. -- View this message in context:

[GENERAL] user get notification when postgresql database updated

2012-03-28 Thread Albert
I am using javaScript app and PostgreSQL database. I have car_alert as a table contains id (FK of cars table) and userid (FK of users table) each car has a status ( status column in cars table ). car_alert is updating and having new records (car id and userid ) every time user choose car to be

[GENERAL] Recovery with WAL

2011-02-08 Thread Albert
Where can I find information about recovery_target_time or recovery_target_xid. I have two servers db1 and db2, WAL files are copied from db1 to db2. Database will colapse at 17:10 and i wan't to recove base from 17:05, so where can I find info about recovery_time. Albert -- Sent via

[GENERAL] Transactions through JDBC

2007-04-11 Thread Albert
Hi all! Actually I have a client-server application with one server and many clients each one of which opens a different connection to the postgres database. In order to avoid those known problems with the execution of the different clients' operations at database, I implemented everything in

[GENERAL] Paranthesis and Driver JDBC

2007-03-28 Thread Albert
Hi all! I use postgresql 8.0 and its driver for JDBC.A strange thing happens: when my application creates a query it is created always with a parenthesis more than expected, that is a query like this one: SELECT * FROM table_x WHERE (table_x.afield='a' and table_x.bfield='b')) order by table_x.a

[GENERAL] Reserve a value in a serial type field

2007-01-15 Thread Albert
Hi all. I have this issue: I need to load a value for an integer field (with auto increment) which I implemented with a serial type and to avoid inserts with that value in this field. The task is for a distributed program I'm creating and I wonder if there is an efficient solution for it. I

Re: [GENERAL] Reserve a value in a serial type field

2007-01-15 Thread Albert
Thanks Shane. I solved taking trace of the sequence value directly in the program...it is not a good solution but it works until I find a better one! ---(end of broadcast)--- TIP 4: Have you searched our list archives?

[GENERAL] Calling pg_dump from another application in safe mode

2006-11-29 Thread Albert
Hi, I'm wondering if there is a method to call pg_dump from an external application without changing the security level in pg_hba.conf from trust to md5. I'd like to pass my password not in clear but using a secure cryptographic method like md5. Any suggestion? Thanks!

[GENERAL] PostGreSql cannot start after windows update

2006-11-16 Thread Albert
Hi all! I have windows XP professional 2003. Yesterday evening I installed, while turning off my pc, some updates of the os and this morning the database server does not start!! May some have a trick to help me? I fund something on the web but too unspecific... Thanks!!

Re: [GENERAL] PostGreSql cannot start after windows update

2006-11-16 Thread Albert
Dear Richard. I've now solved reading a French forum. I obtained an error 1069 service cannot start due to logon failure when I tried to start the server manually. Now: it's sufficient to go in the options of the user postgres (Local Users-postgres) and change the settings for the password to set

[GENERAL] Restore data from old installation

2006-09-18 Thread Albert
to have the data inside a database which was stored in that installation...is there a way through the directory /data? I tried something but i did not have success... Please help me Thanks Albert ---(end of broadcast)--- TIP 1: if posting/reading

[GENERAL] insert serial numbers

2006-01-03 Thread Albert Vernon Smith
with the current row.: CREATE RULE two_insert AS ON INSERT TO two DO UPDATE two SET one_id = (SELECT one.one_id FROM one WHERE (new.text = one.text)) WHERE (new.text = two.text); -- Thanks for any help, -albert ---(end of broadcast)--- TIP 2

Re: [GENERAL] insert serial numbers

2006-01-03 Thread Albert Vernon Smith
. Albert Vernon Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have two tables, listed as below. I'm inserting values for text into table two (which must already exist as text values in table one). When I do that, I'd like to also insert the associated one_id value from

Re: [GENERAL] insert serial numbers

2006-01-03 Thread Albert Vernon Smith
EXECUTE PROCEDURE return_one_id() Voila! -albert On 3.1.2006, at 14:36, Albert Vernon Smith wrote: I have two tables, listed as below. I'm inserting values for text into table two (which must already exist as text values in table one). When I do that, I'd like to also insert the associated

[GENERAL] optimizer not optimizing

2005-06-30 Thread Albert Vernon Smith
back, but I've still not solved this issue.) Thanks, -albert ---(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

Re: [GENERAL] optimizer not optimizing

2005-06-30 Thread Albert Vernon Smith
Yes, I did an analyze, and see this behavior. -albert On 30.6.2005, at 20:39, Joshua D. Drake wrote: Albert Vernon Smith wrote: I am in process of migrating from Pg 7.4.5 to 8.0.3. I have the same data loaded in to the two. However, when I do a query on my 8.0.3 installation, I am

[GENERAL] query plan in pg7.4 vs 8.0.3

2005-06-17 Thread Albert Vernon Smith
can I migrate a very large database which uses this datatype extensively. Any help is greatly appreciated. Thanks, -albert === In Pg 8.0.3-- EXPLAIN select * from snp_quality_overview limit 10; QUERY PLAN

Re: [GENERAL] query plan in pg7.4 vs 8.0.3

2005-06-17 Thread Albert Vernon Smith
I just re-checked, and all the same index definitions are on both tables. Cheers, -albert On 17.6.2005, at 14:20, Tom Lane wrote: Albert Vernon Smith [EMAIL PROTECTED] writes: I am in process of migrating a database from Pg 7.4.3 to Pg 8.0.3. I dumped and reloaded the data, and things

[GENERAL] max. size for a table

2001-04-22 Thread Albert
very much. Best Regards Albert ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [GENERAL] jdbc question

2000-01-19 Thread Albert Loo
ant to try : //String url = "jdbc:postgresql://gina/testdb"; String url = "jdbc:postgresql://127.0.0.1:5432/testdb"; //Connection con = DriverManager.getConnection(url, "", ""); Connection con = DriverManager.getConnect

[GENERAL] Query buffer problem.

1999-08-03 Thread Albert Chen
length of 2 exceeded query line ignored Segmentation fault (core dumped) Would anyone know how to solve this problem, thanks in advance. -Albert __ Get Your Private, Free Email at http://www.hotmail.com

[GENERAL] Cannot compile JDBC.

1999-07-16 Thread Albert Chen
: Package postgresql.util not found in import. import postgresql.util.*; ^ 4 errors make: *** [postgresql/Connection.class] Error 1 Would anyone help me how to solve the problem, thanks. -Albert __ Get Your Private, Free Email at http

[GENERAL] SQL Regular expression

1999-07-14 Thread Albert Chen
. -Albert __ Get Your Private, Free Email at http://www.hotmail.com

[GENERAL] Does Apache has PostgreSQL module?

1999-07-08 Thread Albert Chen
Hi, I know there is a ApacheMysql module. Has ApachePostgres module? -Albert __ Get Your Private, Free Email at http://www.hotmail.com

[GENERAL] Date convertion problem.

1999-07-05 Thread Albert Chen
Hi, I have a problem about date convertion. I insert a value which attribute is date, like this: insert into example values ('19 Mar 1999'); How do I show the date become 1999/3/19? Thanks in advance, Albert. __ Get Your Private, Free