Re: [GENERAL] cycling through custom type fields

2011-05-19 Thread Julius Tuskenis
igger... Thank You once again. I can stop google'ing now :) -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050

[GENERAL] cycling through custom type fields

2011-05-18 Thread Julius Tuskenis
in advance! -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050 -- 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] Load Image File From PostgreSQL DB

2008-12-31 Thread Julius Tuskenis
> component code -> libpq". So the programmer should choose if he (she) wants to use libpq directly or via components as mixed way would require knowledge of how components operate. As I don't (and don't want to) I use only components. Julius Tuskenis -- Sent via pgsql-gen

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-30 Thread Julius Tuskenis
I find it much easier to get a relatively small blob in a result set and not directly using lo_read function, because in delphi zeos components does work with libpq, so theres no need to bypass them? Julius Tuskenis Albe Laurenz rašė: dbalinglung wrote: I seriously doubt you could store a

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-29 Thread Julius Tuskenis
e jpg files. I found an alternative - EDBImage. Hope that helps. Good luck. Julius Tuskenis dbalinglung rašė: Dear Expert, I'm sorry for my newbie question, I have a dificulty to load image file from field OID type on PostgreSQL with Borland Delphi 7. I would like to showing

Re: [GENERAL] Question about pattern matching

2008-12-23 Thread Julius Tuskenis
Hi, Dimitris I think simple SELECT TABLENAME.id FROM TABLENAME WHERE prm_patern ilike TABLENAME.candidate_pattern||'%' ORDER BY |char_length(|TABLENAME.candidate_pattern) desc LIMIT 1 should do the trick. (Provided TABLENAME is not very large of course) Julius Tuskenis dimitri

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread Julius Tuskenis
n AS $BODY$BEGIN RETURN prm_integer::text ~~* prm_text ; END;$BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100; ALTER FUNCTION of_integer_ilike_text(integer, text) OWNER TO useris; CREATE OPERATOR ~~( PROCEDURE = of_integer_ilike_text, LEFTARG = int4, RIGHTARG = text); I'm sure you&

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread Julius Tuskenis
Yes, Raymond - I know how to return record set in function using FOR, but since version 8.3 there is a option - using RETURN QUERY SELECT something FROM somewhere;. So if it works for SELECT why should it not work for EXECUTE ? Julius Tuskenis Raymond O'Donnell rašė: On 18/12/2008

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread Julius Tuskenis
Thank you Andreas and Grzegorz. It worked! While experimenting I found that if I wright FOR rec IN EXECUTE 'my sql' LOOP .. its OK, but If I wright RETURN QUERY EXECUTE 'my sql' I get syntax error. Is it a bug? Julius Tuskenis A. Kretschmer rašė: In respons

[GENERAL] SQL plan in functions

2008-12-18 Thread Julius Tuskenis
helped me realize, that the problem was because the function has only one plan of SQL inside no matter the parameters values. Is there a way to order postgres to check the plan each time the function is called? -- Julius Tuskenis -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] pglib.dll for windows ce

2008-11-28 Thread Julius Tuskenis
Sorry - its libpq.dll Julius Tuskenis Julius Tuskenis rašė: Hello List, I'm writing a program to be run on WinCE. Are there dll's for wince client (pglib.dll and others)? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscrip

[GENERAL] pglib.dll for windows ce

2008-11-27 Thread Julius Tuskenis
Hello List, I'm writing a program to be run on WinCE. Are there dll's for wince client (pglib.dll and others)? -- Julius Tuskenis -- 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] [pgadmin-support] problem with check constraints

2008-10-09 Thread Julius Tuskenis
B or C and D) which is wrong. Please help. Cheers, Anton -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050 -- 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] Connection to second database on server

2008-06-20 Thread Julius Tuskenis
you to go that path because of security reasons. Julius Tuskenis Hermann Muster rašė: Hello everyone, I already asked about that a couple of days ago, but didn't get an satisfying solution for my problem which is following: I need to create a view that does a query on a second databa

Re: [GENERAL] How to INSERT empty line into SEQUENTIAL table from PHP

2008-06-16 Thread Julius Tuskenis
I guess you get duplicate value error because you have previously inserted ID column with your own values. Check the sequence page_input_id_seq if it points to the right next value. If not - correct it to a MAX(ID) +1 Julius Tuskenis Stefan Schwarzer rašė: It doesn't work like

Re: [GENERAL] How to INSERT empty line into SEQUENTIAL table from PHP

2008-06-15 Thread Julius Tuskenis
urself: INSERT INTO table_xx (ID, field2, field3, field4) VALUES (NEXTVAL('some_sequence'), '', '', ''); Julius Tuskenis Stefan Schwarzer rašė: Hi, rahter dump question, I guess But I have a table with a sequential index field, into which I would li

Re: [GENERAL] why sequential scan is used on indexed column ???

2008-06-15 Thread Julius Tuskenis
Hi Michael. Thank you for your answer. I've checked - enable_nestloop is true. I did ANALYZE, but that didn't help. The sequential scan is still used Any more ideas why? Julius Tuskenis Michael Fuhr rašė: On Sat, Jun 14, 2008 at 04:59:44PM +0200, Andreas Kretschmer wrote:

Re: [GENERAL] why sequential scan is used on indexed column ???

2008-06-15 Thread Julius Tuskenis
Hello, Tom. So I think the OP's problem is purely a statistical one, or maybe he's in a situation where he should reduce random_page_cost.) What could be done solving that "statistical problem"? :) Current value for random_page_cost is 4. What value would you sugges

[GENERAL] why sequential scan is used on indexed column ???

2008-06-14 Thread Julius Tuskenis
eikalingas, kai norim skaiciuoti kartus zmoniu turinciu abonementa keliuose klubuose'; COMMENT ON COLUMN apsilankymai.aps_statusas IS '0 - neiejes, 1 - viduje, 2 - isejes'; CREATE INDEX idx_aps_saskaita ON apsilankymai USING btree (aps_saskaita); Thank you in advance. -- Juli