<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.6.1" -->
<rss version="0.92">
<channel>
	<title>coding.sergey</title>
	<link>http://coding.sergey.me</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 02 Mar 2010 21:52:23 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Cybersecurity</title>
		<description> </description>
		<link>http://coding.sergey.me/2010/03/02/cybersecurity/</link>
			</item>
	<item>
		<title>Get list of all foreign key constraints.</title>
		<description>Here is the way i do this -


SELECT conname,
       t.relname AS TABLE,
       tf.relname AS ftable,
       a.attname AS field,
       af.attname AS ffield
FROM pg_constraint c,
    ...</description>
		<link>http://coding.sergey.me/2010/02/05/get-list-of-all-foreign-key-constraints/</link>
			</item>
	<item>
		<title>Multithread url fetch using PHP.</title>
		<description>To be honest, that's not a good idea to use fork in php since it eats memory very aggressively. However, in some situations this can be really useful or can be a temporary solution.

Here is an example of using php function pcntl_fork:







Another useful function that can be used for downloading ...</description>
		<link>http://coding.sergey.me/2010/01/04/multithread-url-fetch-using-php/</link>
			</item>
	<item>
		<title>row_number() for Postgres before 8.4</title>
		<description>Unfortunately i found a solution for this problem only this week, after the new postgres version 8.4 was already released. In the new version this function is already implemented along with many other functions called "window functions".
In any way, for everyone that still uses Postgress version less then 8.4, here ...</description>
		<link>http://coding.sergey.me/2009/07/10/row_number-for-postgres-before-84/</link>
			</item>
	<item>
		<title></title>
		<description>
"Where mysql is good, grep is good too"
from russian forums...


 </description>
		<link>http://coding.sergey.me/2009/05/31/15/</link>
			</item>
	<item>
		<title>inet_ntoa and inet_aton functions for Postgresql</title>
		<description>These functions can be used to convert integer to ip and visa verse. This sometimes also called inet_itoa and inet_atoi.


create or replace function inet_aton(inet) returns bigint as '
select inetmi($1,''0.0.0.0'');'
language sql immutable;
create or replace function inet_ntoa(int) returns inet as '
select ''0.0.0.0''::inet+$1;'
language sql immutable;

=&#62; select inet_ntoa(16843265);
inet_itoa
-----------
1.1.2.1
(1 row)

=&#62; select inet_aton('1.1.2.1');
inet_atoi
-----------
16843265
(1 row) </description>
		<link>http://coding.sergey.me/2009/03/31/inet_ntoa-and-inet_aton-functions-for-postgresql/</link>
			</item>
	<item>
		<title>Using Eclipse for editing remote files with ssh/sftp.</title>
		<description>It took me a while to figure out how to work with remote files on server using Eclipse. It seems most of Eclipse users are developing locally and upload already tested code to the server (maybe i'am wrong). But for me it is important to work directly with remote files.
While ...</description>
		<link>http://coding.sergey.me/2008/08/22/using-eclipse-for-editing-remote-files-with-sshsftp/</link>
			</item>
	<item>
		<title>Get list of databases/tables/views in Postgresql</title>
		<description>Get list of databases - 
select datname FROM pg_catalog.pg_database;

This displays tables, views, indexes and sequences except postgres internal tables/views
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN
'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as "Type",
u.usename as "Owner"
FROM pg_catalog.pg_class ...</description>
		<link>http://coding.sergey.me/2008/08/21/get-list-of-databasestablesviews-in-postgresql/</link>
			</item>
</channel>
</rss>
