[GENERAL] pl/pgsql for loops

2008-11-15 Thread Tomasz Myrta
Hello I have some "for x in select ..." loops which compares current record with previous ones. Is it possible to check if such loop is reaching final pass? Now, I check "found" variable after the loop and usually duplicate part of it's code. -- Regards, Tomasz

Re: [GENERAL] How can I tell, in a trigger, if a value in a string is an integer.

2008-10-29 Thread Tomasz Myrta
Philip W. Dalrymple napisal 29.10.2008 15:26: set_config('session.sessionid','23',false); I validate strings with regexp. This expression returns true: select '23' ~'^-{0,1}[0-9]+$'; If it's true - you can cast it safely: select cast('23&#

Re: [GENERAL] Order by with spaces and other characters

2008-10-25 Thread Tomasz Myrta
ot;ORDER BY xxx USING ~<~" It's default when database is initialized with "C" locale. -- Regards, Tomasz Myrta -- 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 with to emulate function TRANSFORM from Access in Postgress?

2008-10-25 Thread Tomasz Myrta
/tablefunc.html -- Regards, Tomasz Myrta -- 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] Query m:n-Combination

2008-10-25 Thread Tomasz Myrta
_r_id from join_table where mn_2_c_id in (1,2,3,4) group by mn_2_r_id having count(*)=4 (4 = how many communities we should find) -- Regards, Tomasz Myrta -- 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 to get user list and privileges?

2008-10-24 Thread Tomasz Myrta
nal sql-queries to screen. -- Regards, Tomasz Myrta -- 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] ssl woes after 8.1 -> 8.3 update

2008-10-16 Thread Tomasz Myrta
owto to do things properly in spite of just trial and errors? This one should be enough: http://www.postgresql.org/docs/current/interactive/ssl-tcp.html You should either provide matching client certificate or remove root.crt from server configuration. -- Regards, Tomasz Myrta -- Sent

Re: [GENERAL] PQescapestringConn not found in libpq.dll

2008-10-16 Thread Tomasz Myrta
#x27;s are case-sensitive. Use |PQescapeStringConn instead. -- Regards, Tomasz Myrta | -- 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] PQescapestringConn not found in libpq.dll

2008-10-16 Thread Tomasz Myrta
I get a message box with the information that the ordinal 126 was not found in the dynamic library libpq.dll It sounds like what you're actually using is an 8.1 or older libpq.dll. My 8.1.5 libpq.dll contains this function. -- Regards, Tomasz Myrta -- Sent via pgsql-general mailin

Re: [GENERAL] know the schema name in a trigger

2008-01-12 Thread Tomasz Myrta
hcema name "myschema".. Did you try function current_schema() ? -- Regards, Tomasz Myrta ---(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] Linux distro

2007-08-01 Thread Tomasz Myrta
t wait too long for newest versions - even beta and rc. Regards, Tomasz Myrta ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] SQL query question

2004-12-22 Thread Tomasz Myrta
from parent where not exists (select * from child where child.iod_parent=parent.oid); Regards, Tomasz Myrta ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] pl/pgsql oddity

2004-12-16 Thread Tomasz Myrta
achable code. The same sense will have function below: create or replace function fubar() returns varchar as ' declare l integer; begin l = 38; if l < 38 then return ''< 38''; bleblbebleblebe sfdsdf; nothing special; else return ''this is