<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="http://rss.egloos.com/style/blog.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
	<title>제갈장비</title>
	<link>http://dojeun.egloos.com</link>
	<description>라면 한그릇 드세요.. ㅋㅋ</description>
	<language>ko</language>
	<pubDate>Thu, 07 Aug 2008 15:07:40 GMT</pubDate>
	<generator>Egloos</generator>
	<image>
		<title>제갈장비</title>
		<url>http://pds1.egloos.com/logo/1/200609/07/08/d0029308.jpg</url>
		<link>http://dojeun.egloos.com</link>
		<width>80</width>
		<height>57</height>
		<description>라면 한그릇 드세요.. ㅋㅋ</description>
	</image>
  	<item>
		<title><![CDATA[ 일본어 운영체제에서 Opera와 Firefox를 사용할 때 한글입력에서... ]]> </title>
		<link>http://dojeun.egloos.com/2010572</link>
		<guid>http://dojeun.egloos.com/2010572</guid>
		<description>
			<![CDATA[ 
  지금 일본어 버전 Windows2000 에서<br />
Firefox 3.0.1로 이 글을 작성하고 있는데<br />
Opera 9.51에선 한글입력에 문제가 있다.<br />
Opera에선 한글입력 후 띄어쓰기를 하려고 스페이스바를 누르면<br />
직전에 입력했던 한글이 다시 나타나는 문제가 있다.<br />
<br />
한글버전에선 문제가 없는지....<br />
			 ]]> 
		</description>
		<category>TIP-Windows</category>

		<comments>http://dojeun.egloos.com/2010572#comments</comments>
		<pubDate>Thu, 07 Aug 2008 15:07:40 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ ASP참고 페이지 모으기 ]]> </title>
		<link>http://dojeun.egloos.com/537344</link>
		<guid>http://dojeun.egloos.com/537344</guid>
		<description>
			<![CDATA[ 
  ASP, VBScript에서 자신만의 클래스(Class) 만드는 방법<br />
<a href="http://korea.internet.com/channel/content.asp?nid=14820&amp;cid=185#start">http://korea.internet.com/channel/content.asp?nid=14820&amp;cid=185#start</a> <br />
<br />
ASP,ASP.NET &amp; Script<br />
<a href="http://www.egocube.pe.kr/asp_main.asp">http://www.egocube.pe.kr/asp_main.asp</a> <br />
<br />
ASP 공부하지 않으련<br />
<a href="http://ven.kangnam.ac.kr/software/asp/">http://ven.kangnam.ac.kr/software/asp/</a> <br />
<br />
<a href="http://www.superuser.co.kr/asp/index.htm">http://www.superuser.co.kr/asp/index.htm</a>			 ]]> 
		</description>
		<category>TIP-ASP</category>

		<comments>http://dojeun.egloos.com/537344#comments</comments>
		<pubDate>Fri, 10 Nov 2006 01:37:21 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Log4J ]]> </title>
		<link>http://dojeun.egloos.com/486459</link>
		<guid>http://dojeun.egloos.com/486459</guid>
		<description>
			<![CDATA[ 
  <p><a href="http://kwon37xi.egloos.com/2176487">http://kwon37xi.egloos.com/2176487</a></p><p><a href="http://www.50001.com/language/javaside/eyjin/2-2/8-1.html">http://www.50001.com/language/javaside/eyjin/2-2/8-1.html</a></p><p><a href="http://www.php.pe.kr/java_main/tnt/etc/log4j_config.html">http://www.php.pe.kr/java_main/tnt/etc/log4j_config.html</a></p><p><a href="http://www.okjsp.pe.kr/bbs?act=VIEW&amp;bbs=bbs4&amp;seq=46372">여러파일에 로그를 남기는 방법에 대하여 </a></p><p><a href="http://www.okjsp.pe.kr/bbs?seq=56045">log4j 에서 struts 관련 로그 끄기 </a></p><p><a href="http://blog.naver.com/loverobin/60026805373">http://blog.naver.com/loverobin/60026805373</a></p>			 ]]> 
		</description>
		<category>TIP-JAVA</category>

		<comments>http://dojeun.egloos.com/486459#comments</comments>
		<pubDate>Fri, 27 Oct 2006 02:01:01 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ [펌]톰캣에서 log4j 실행시 에러 바로 잡기 ]]> </title>
		<link>http://dojeun.egloos.com/473226</link>
		<guid>http://dojeun.egloos.com/473226</guid>
		<description>
			<![CDATA[ 
  출처 : <a href="http://cafe.naver.com/devmaster.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=30">http://cafe.naver.com/devmaster.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=30</a><br />
<br />
<br />
<p>일반적으로 웹 문서를 찾아보면 log4j-1.2.13.jar를 클래스 패스에 추가 시킨 후</p><p>/WEB-INF/classes아래 log4j.properties파일을 넣으면 간단하게 실행이 된다고 써 있다.</p><p>&nbsp;</p><p>그러나 톰캣을 실행 시킬 경우 아래와 같은 문구가 뜨면서 로깅이 안되는 경우가 자주 발생한다.</p><p>&nbsp;</p><p>log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).<br />
log4j:WARN Please initialize the log4j system properly.</p><p>&nbsp;</p><p>&nbsp;</p><p>이것은 log4j.properties를 찾지 못해서 초기화가 안되어 나는 메시지이다.</p><p>물론 아래와 같이 콘솔에만 출력하는 경우에는 별로 문제 될 것이 없다.</p><p>&nbsp;</p><p>----------------------------------------------------------------------------------------------------</p><pre>import org.apache.log4j.Logger; </pre><pre>import org.apache.log4j.BasicConfigurator; </pre><pre>public class SimpleLog { </pre><pre>// Logger 클래스의 인스턴스를 받아온다. </pre><pre> static Logger logger = Logger.getLogger(SimpleLog.class); </pre><pre> public SimpleLog() {} </pre><pre> public static void main(String[] args) { </pre><pre> /* 콘솔로 로그 출력 위한 간단한 설정, 이 설정이 없다면 경고 메세지가 출력되면서 실행이 중단된다.*/ </pre><pre> BasicConfigurator.configure(); </pre><pre> logger.debug("Hello log4j."); </pre><pre> logger.info("Hello log4j."); </pre><pre> logger.warn("Hello log4j."); </pre><pre> logger.error("Hello log4j."); </pre><pre> logger.fatal("Hello log4j."); </pre><pre> //loger.log( Level.DEBUG , "debug") 와 동일하다. </pre><pre> } </pre><pre>} </pre><p>&nbsp;</p><p>----------------------------------------------------------------------------------------------------------------</p><p>그러나 파일에 출력하면 서 콘솔에 출력하려면 문제가 발생한다.</p><p>간단하게 해결하는 방법은 properties파일을 톰캣이 실행되는 /bin 아래 두는 것이다.</p><p>&nbsp;</p><p>그러나 좀더 우아하게 해결하려면 <span style="FONT-SIZE: 100%"><strong>초기화 서블릿</strong></span>을 만들면 된다.</p><p>&nbsp;</p><p>=================================================================================================================</p><p>&nbsp;</p><p>package com.foo;</p><p>&nbsp;</p><p>import org.apache.log4j.PropertyConfigurator;</p><p><br />
import javax.servlet.http.HttpServlet;</p><p><br />
import javax.servlet.http.HttpServletRequest;</p><p><br />
import javax.servlet.http.HttpServletResponse;</p><p><br />
import java.io.PrintWriter;</p><p><br />
import java.io.IOException;</p><p>&nbsp;</p><p>&nbsp;</p><p>public class Log4jInit extends HttpServlet {</p><p>&nbsp;</p><p>&nbsp; public&nbsp; void init() {</p><p><br />
&nbsp;&nbsp;&nbsp;&nbsp; String prefix =&nbsp; getServletContext().getRealPath("/");</p><p><br />
&nbsp;&nbsp;&nbsp;&nbsp; String file = getInitParameter("log4j-init-file");</p><p><br />
&nbsp;&nbsp;&nbsp;&nbsp; // if the log4j-init-file is not set, then no point in trying</p><p><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(file != null) {</p><p><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PropertyConfigurator.configure(prefix+file);</p><p><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p><p><br />
&nbsp; }</p><p>&nbsp;</p><p>&nbsp; public&nbsp; void doGet(HttpServletRequest req, HttpServletResponse res) {</p><p><br />
&nbsp;&nbsp;}</p><p><br />
}<br />
</p><p>===========================================================================================================</p><p>그리고 아래 내용을 <strong><span style="FONT-SIZE: 100%">web.xml</span></strong>에 추가 시킨다.</p><p>=============================================================================================================</p><p>&nbsp;</p><p>&nbsp;&lt;servlet&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;log4j-init&lt;/servlet-name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-class&gt;com.foo.Log4jInit&lt;/servlet-class&gt;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;log4j-init-file&lt;/param-name&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;WEB-INF/classes/log4j.properties&lt;/param-value&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<br />
&nbsp;&lt;/servlet&gt;</p><p><br />
===============================================================================================================</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>그리고 다음과 같이 간단하 해 주면 파일과 콘솔에 떨어지는 로그를 볼 수 있다.</p><p>=======================================================================================================</p><p>&nbsp;</p><p>import org.apache.log4j.Logger;<br />
</p><p>public class CBselectordertot {</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp; private static Logger logger = Logger.getLogger(ip001Impl.class);</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp; public ipcdOut[] getSelectIpcd(String kind,String wherecond){</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ......</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ......</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.info("getSelect_ipcd&nbsp; query = "+query);</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;........</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...........</p><p>&nbsp;&nbsp;&nbsp; }</p><p>}</p><p>&nbsp;</p><p>==================================================================================================&nbsp;&nbsp;&nbsp; </p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>또 하나의 경우...</p><p>코바 서버 같은 것을 구동 시킬경우 로깅을 하기 위해서는 다음과 같이 JVM args를 넣어줘야 한다.(톰캣과는 별개로)</p><p>&nbsp;</p><p>**vizibroker에서 코바 서버구동 예제</p><p>vbj <span style="COLOR: #ff0000">-Dlog4j.configuration=file:d:\ipams\WEB-INF\classes\log4j.properties</span> ip002Server</p><p>&nbsp;</p><p>&nbsp;</p><p>properties예제는 파일에 첨부 했다.</p><p>첨부파일 : <a href="http://pds2.egloos.com/pds/200610/24/08/log4j.properties">log4j.properties</a></p><p>원하는 디렉토리에 떨어뜨리는 것인데 이대로 사용해도 훌륭하다.</p>			 ]]> 
		</description>
		<category>TIP-TOMCAT</category>

		<comments>http://dojeun.egloos.com/473226#comments</comments>
		<pubDate>Mon, 23 Oct 2006 09:30:06 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 무료 DBMS SQL Server Express ]]> </title>
		<link>http://dojeun.egloos.com/458003</link>
		<guid>http://dojeun.egloos.com/458003</guid>
		<description>
			<![CDATA[ 
  <table style="MARGIN-BOTTOM: 8px" cellspacing="0" cellpadding="0" width="568" border="0"><tbody><tr><td id="story_body[author]"><p><font class="list18_b">출처 : <a href="http://www.zdnet.co.kr/builder/dev/dotnet/0,39031607,39142067,00.htm">http://www.zdnet.co.kr/builder/dev/dotnet/0,39031607,39142067,00.htm</a></font></p><p><font class="list18_b">무료 DBMS SQL Server Express</font><br />
<span style="COLOR: #000000"></span><br />
<font class="t11_99" color="#818181">노규남(IT 테크라이터) &nbsp; 2005/12/05</font> </p></td></tr></tbody></table><table style="MARGIN-BOTTOM: 8px" cellspacing="0" cellpadding="0" width="568" border="0"><tbody><tr><td style="vpadding-right: 12px'" align="right"><table cellspacing="1" cellpadding="2" border="0"><tbody><tr><td><a href="javascript:void(0)"></a></td><td><a href="javascript:void(0)"></a></td><td><a href="javascript:void(0)"></a></td><td><a href="javascript:void(0)"></a></td><td><a href="javascript:void(0)"></a></td></tr></tbody></table></td></tr></tbody></table><table style="MARGIN-BOTTOM: 12px" cellspacing="0" cellpadding="0" width="568" border="0"><tbody><tr><td class="body14_2b" valign="top"><table cellspacing="0" cellpadding="0" width="160" align="right" border="0"><tbody></tbody></table><b>지난 회에 이어 VS Express의 구성요소들에 대해서 알아보는 시간을 한주 더 갖도록 하자. 이번 주에 살펴볼 구성요소는 SQL Server Express이다. 이미 잘 알려져 있지만 모르는 사람들을 위해서 부연하자면 이 패키지는 MSDE(Microsoft Desktop Engine)이라고 하는, MS가 이전에 배포한 무료 DBMS의 후신에 해당하는 것이다. </b><br />
<br />
실제 필드에서 프로젝트를 하다보면 Database를 사용하지 않는 경우가 오히려 드물 정도로 DBMS는 개발의 필수요소라 할 수 있는데 최근 DBMS의 기능이 많이 발전한 것은 사실이지만 그 가격이나 덩치 면에서 적잖게 부담되는 면도 없지 않다. 리눅스를 대표로 하는 오픈소스 진영에는 MySQL, PostgreSQL등의 무료 DBMS가 여럿 있었지만 윈도에서만 개발하던 프로그래머라면 이런 DBMS에 접근하기도 쉽지 않았다.<br />
<br />
그래서 MSDE가 무료로 배포되기 전에는 비싼 DBMS 대신 Access의 MDB파일을 파일 데이터베이스로 사용했던 적도 있었다. 그러나 MDB는 쓰고 지우기를 반복하다보면 용량이 엄청나게 늘어나는 문제점이 있었고, 파일이 굉장히 잘 깨진다는 단점이 있었기 때문에 관리에 대해 충분한 지식을 갖지 않은 사용자들에게는 어려웠다. <br />
<br />
이런 상황을 타개하기 위해 등장한 MSDE는 SQL Server 7과 동일한 엔진을 사용하되 GUI로 구동되는 관리용 애플리케이션과 분석도구들을 빼고 용량에 제한을 둔 버전이었는데 소규모의 사이트나 SI 프로젝트를 중심으로 대단한 인기를 얻었다. 또한 SQL Server와 같은 엔진을 사용한다는 호환성면에서의 잇점과 무료라는 매력 때문에 아직도 많은 사이트에서 널리 사용되고 있는 중이다. 그러나 VS2005와 같이 발표된 SQL Server Express는 이 MSDE보다도 한 수 위라는 것이 필자의 평가이다. 그러면서도 똑같이 무료이다.<br />
<br />
<b>설치하기</b><br />
여타 VS Express의 컴포넌트와 마찬가지로 MS의 VS Express사이트에서 다운로드 후 설치한다. 다른 점이 있다면 VS Express는 향후 1년간 다운로드 받는 사용자에 한해 무료이지만 SQL Server Express는 영구히 무료로 배포하게 되어 있다는 것이다. 그간 무료 DBMS의 대명사처럼 여겨졌던 MySQL도 최근 좀 헛갈리는 라이선스 프로그램을 내놓고 대대적으로 상용화할 속내를 비치고 있는 상황을 고려할 때 이런 MS의 정책은 크게 반길만하다. <br />
<br />
본문에서 설명하겠지만 소규모~중규모의 사이트라면 SQL Server Express는 충분히 상용화 가능한 패키지일 뿐만 아니라 설치의 편의성, 가벼움, 무료라는 장점을 생각하면 오라클이나 SQL Server 2005의 정품보다 오히려 나은 선택일 수 있다. 이 패키지가 무료이며 기능제한이 있는 Express 에디션임에도 불구하고 상용패키지와 비교하는 것은 그만큼 강력하고 사용자의 요구를 커버할 수 있는 범위가 넓기 때문이다. 재배포도 가능한데 이때는 MS에서 제안하는 Go-Live 라이센스에 동의해야 한다. Go-Live 라이센스에 대해서는 다음 링크를 참조하자.<br />
<br />
<a href="http://www.microsoft.com/korea/msdn/vs2005/golive/" target="_blank">http://www.microsoft.com/korea/msdn/vs2005/golive/</a><br />
<br />
SQL Server Express의 패키지 용량은 약 55MB정도 되는데 Windows 2000이상을 요구하며, 닷넷 프레임워크 2.0 과 Windows Installer 3.0이상을 필요로 한다. 물론 이전 버전의 VS 2005 및 VS 2005 Express버전을 모두 깨끗이 삭제한 후 설치해야 한다. VS2005 beta를 지워주는 CleanUp 도구에 대해서는 여러번 소개했으니 다시 언급하지는 않겠다.<br />
<br />
설치과정은 몇 번 마우스클릭을 해주면 끝날 정도로 간단하다. 이 작업이 종료되면 SQL Server Express가 정상적으로 작동중인지를 확인하기 위해 코맨드 라인을 하나 띄워서 다음과 같이 입력해보자.<br />
<br />
<div style="MARGIN-LEFT: 15px"><br />
sqlcmd -S localhost\SQLExpress<br />
</div><br />
1&gt;과 같이 숫자가 계속해서 증가하는 프롬프트가 나타나면 성공이다. sqlcmd는 SQL Server Express에 접속하는 코맨드 라인 유틸리티로 -S는 서버를 지정하는 옵션을 준 것이다. 여기서는 localhost의 SQLExpress라는 Instance를 지정했다. SQL Server Express의 Default Instance이름은 항상 'SQLExpress'가 되니 참고하기 바란다. 여기서 여러 가지 명령으로 서버를 조작할 수 있으며, MSDE에도 있던 전통적인 osql을 사용할 수도 있다. osql로 유사한 방식으로 접속한 후 TSQL 명령을 입력해서 원하는 작업을 하면 된다. <br />
<br />
그러나 GUI가 대중화된지 10년이 넘은 지금 코맨드 라인 도구를 이용해 조작하는 것은 역시 불편하다. 이것은 대부분의 무료 DBMS가 겪고 있는 문제점으로, 서버의 성능은 만족하나 편의하게 사용할 수 있는 클라이언트단 도구가 항상 부족하다는 것이다. SQL Server Express는 이에 대한 해결책으로 SQL Server Management Studio Express라는 멋진 도구를 같이 제공한다. 이 도구에 대해서는 뒤에 다시 다루도록 하자.<br />
<br />
<b>SQL Server Express는 SQL Server 2005이다</b><br />
SQL Server Express와 MSDE를 구분 짓는 가장 큰 특징은 SQL Server Express는 SQL Server 2005의 한 에디션이라는 것이다. MSDE가 SQL Server 7의 엔진을 사용하기는 했지만 어디까지나 MSDE는 SQL Server와는 달랐고 그렇기 때문에 MSDE를 쓰고자 하는 사용자는 새로운 도구들을 익히지 않으면 안 되었다. 하지만 SQL Server Express는 엄연히 SQL Server 2005의 한가지 버전이므로 기본적인 컨셉, 도구, 관리방법 등을 모두 공유한다. 물론 SQL Server Express는 기능이나 용량등에서 제한을 받기는 하지만 MSDE처럼 SQL Server와 별개로 다루어지는 제품이 아니라는 뜻이다. 그렇기 때문에 SQL Server 2005에 관련된 문서나 책자를 가지고 있다면 기본적인 부분은 SQL Server Express에도 똑같이 적용된다.<br />
<br />
또한 이런 이유로 인해, 사이트가 확장되어서 더 많은 용량과 기능이 필요해지면 SQL Server Express를 Workgroup -&gt; Standard -&gt; Enterprise버전으로 업그레이드하는데도 큰 비용이나 시간이 들지 않는다. 관리도구나 그 동안 사용했던 애플리케이션도 똑같이 쓰면 된다. 이 부분은 MS의 노림수이기도 할 것으로 보이는데, SQL Server Express는 무료로 배포해서 저변을 늘리고 사이트가 확장될때 정식버전을 판매해서 수익을 올리는 방식이 어느 정도 설득력이 있다. 어쨌거나 사용자 입장에서는 다소의 제한이 걸린 SQL Server 2005를 무료로 쓰게 된 셈이니 나쁠 건 없다.<br />
<br />
<b>SQL Server Management Studio Express</b><br />
MySQL이나 MSDE와 같은 무료 DBMS를 사용하는 사람들의 가장 큰 불만은 데이터베이스를 관리하는 클라이언트단 유틸리티가 빈약하다는 것이다. 그러나 SQL Server Express에서는 SQL Server Management Studio Express(이하 SSMSE)라는 멋진 툴을 사용할 수 있다. 이 도구는 현재 정식버전이 아닌 CTP이지만 SQL Server Express와 함께 매우 안정적으로 잘 작동하며 강력하다. 설치파일은 약 30MB정도인데 닷넷 Framework 2.0과 MSXML Parser 6.0가 미리 설치되어 있어야 하므로 참고하자. 파일은 다음 페이지에서 받을 수 있다.<br />
<br />
<a href="http://www.microsoft.com/downloads/details.aspx?amp;displaylang=en&amp;familyid=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&amp;displaylang=en" target="_blank">http://www.microsoft.com/downloads/details.aspx?</a><br />
<br />
설치 후 실행해보면 어떤 식으로 사용하는지 금방 익힐 수 있는 친숙한 인터페이스가 나타나며, 사용자는 이 도구를 이용해 계정, 데이터베이스, 테이블등 DBMS 관련된 모든 객체를 관리하고 조회할 수 있다. SQL Server나 오라클을 써본 사람이라면 배울 필요도 없이 금방 쓸 수 있는 매우 일반적인 인터페이스를 채용하고 있다. 사실 SSMSE를 사용하면 다른 도구가 거의 필요 없을 정도인데 무료로 사용할 수 있는 DBMS에 이 정도의 툴을 지급한다는 것은 다른 무료 DBMS와 확실히 차별화되는 SQL Server Express만의 장점일 것이다.<br />
<br />
<b>기능 제한과 주요 기능</b><br />
SQL Server Express는 여러 가지 기능적인 제한을 갖는다고 앞서 언급했다. 그 주요제한은 다음과 같다. <br />
<br />
<br />
<li>리포팅 서비스는 지원되지 않는다.<br />
</li><br />
<li>OLAP/Data mining 서비스는 지원되지 않는다.<br />
<li>Analsys 서비스는 지원하지 않는다.<br />
<li>DTS를 지원하지 않는다.<br />
<li>Database Mirroring은 지원하지 않는다.<br />
<li>Database의 크기는 4GB로 제한된다.<br />
<li>지원하는 RAM의 크기는 1GB까지이다.<br />
<li>SMP시스템이라도 CPU는 1개만 지원한다.<br />
<br />
그러나 SQL Server Express는 SQL Server 2005의 한 에디션이다. 그러므로 다음과 같은 주요기능들을 지원한다. <br />
<br />
<li>SQL Server Express는 stored procedure를 지원한다. <br />
<li>SQL Server Express는 view를 지원한다. <br />
<li>SQL Server는 Trigger를 지원한다. <br />
<li>SQL Server는 Replication Subscriber가 될 수 있다.<br />
<li>SQL Server는 XML을 지원한다. <br />
<br />
여기서 설명되지 않은 제한이나 기능도 있지만 전체적인 모양은 작은 사이트에서 사용할 때 최고의 성능을 발휘하도록 최적화된 그런 형태이다. SQL Server의 정품이 갖는 고급기능도 많이 포함하고 있으므로 개발자 입장에서는 훨씬 편하게 작업할 수 있을 것이다. 다만 데이터베이스의 크기가 4GB로 제한되어 있으므로 대용량 데이터가 지속적으로 발생하는 사이트에서는 쓰기 어렵고, 또 램 1GB와 CPU 1개의 제한이 있기 때문에 고성능을 요하는 사이트에도 역시 맞지 않다. 이런 점을 생각해서 자신이나 자신의 조직에 어떤 에디션이 필요한지 잘 판단해보기 바란다. 하지만 SQL Server Express는 많은 경우 최선의 선택이 될 것이다.<br />
<br />
<b>마치며</b><br />
지금까지 설명한 내용들을 보면 알 수 있듯이 SQL Server Express가 SQL Server 정품에 비교해 갖는 제한이라는 것은 사이트가 작으면 거의 문제가 되지 않는 것임에 비해 지원하는 기능들은 너무나 강력하다. 또한 거듭 얘기되지만 SQL Server Express는 SQL Server 2005의 한 에디션이므로 향후 업그레이드가 용이하다는 것도 큰 장점이다.<br />
<br />
SQL Server Express는 이런 장점들을 바탕으로 그간 MySQL 등 오픈소스 쪽의 무료 DBMS들이 차지했던 시장의 상당부분을 차지할 가능성이 있다. MS의 독점이 심화되는 것은 분명 경계할만한 일이지만 이젠 기존의 것보다는 좀더 강력하며 편리한 인터페이스를 갖는 무료 DBMS 하나쯤 나와도 좋지 않을까 한다. 항상 경쟁은 발전을 유도하는 법이므로 MS의 무료배포에 자극받은 오픈소스 측의 DBMS들이 지금보다 더 발전하게 된다면 그것도 역시 좋은 일이다. 시장의 방향이 어느 쪽으로 흘러가든 사용자는 즐겁게 기다릴 뿐이다.</li></td></tr></tbody></table>			 ]]> 
		</description>
		<category>문서-MSSQL</category>

		<comments>http://dojeun.egloos.com/458003#comments</comments>
		<pubDate>Thu, 19 Oct 2006 07:31:07 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ vi Editor 명령어 요약 ]]> </title>
		<link>http://dojeun.egloos.com/457173</link>
		<guid>http://dojeun.egloos.com/457173</guid>
		<description>
			<![CDATA[ 
  <p>&nbsp;</p><h2><span style="FONT-FAMILY: Verdana">vi Editor's Command Collection</span><br />
</h2><div align="left"><table class="type" cellspacing="0" bordercolordark="white" bgcolor="#dedfde" bordercolorlight="black" border="1"><tbody><tr><td width="37%" bgcolor="#b2b2f2"><p align="center">&nbsp;command line 명령어</p></td><td width="376" bgcolor="#b2b2f2"><p>내 용</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>vi file</p></td><td width="376" bgcolor="#f2f2f2"><p>vi를 시작하여 지정한 파일 편집</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>vi -r file</p></td><td width="376" bgcolor="#f2f2f2"><p>읽기 전용(read- only) 편집기로서 vi를 시작하여 지정한 파일 편집</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>view file</p></td><td width="376" bgcolor="#f2f2f2"><p>읽기 전용(read- only) 편집기로서 vi를 시작하여 지정한 파일 편집</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>vi -r</p></td><td width="376" bgcolor="#f2f2f2"><p>되살릴 수 있는 모든 파일 이름 보여주기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>vi -r file </p></td><td width="376" bgcolor="#f2f2f2"><p>vi를 시작하여 지정한 파일 되살리기</p></td></tr></tbody></table></div><p><div align="left"><table class="type" cellspacing="0" bordercolordark="white" bordercolorlight="black" border="1"><tbody><tr><td width="37%" bgcolor="#b2b2f2"><p align="center">편 집 명 령</p></td><td width="375" bgcolor="#b2b2f2"><p>내 용 </p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>i</p></td><td width="375" bgcolor="#f2f2f2"><p>입력 모드로 전환, 커서 위치 앞에서 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>a</p></td><td width="375" bgcolor="#f2f2f2"><p>입력 모드로 전환, 커서 위치 뒤에서 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>I</p></td><td width="375" bgcolor="#f2f2f2"><p>입력 모드로 전환, 현재 줄의 앞에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>A</p></td><td width="375" bgcolor="#f2f2f2"><p>입력 모드로 전환, 현재 줄의 끝에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>o</p></td><td width="375" bgcolor="#f2f2f2"><p>입력 모드로 전환, 현재 줄의 아래에 전개</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>O</p></td><td width="375" bgcolor="#f2f2f2"><p>입력 모드로 전환, 현재 줄의 위에 전개</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:e file</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 파일의 편집</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:e! file</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 파일의 편집, 자동 점검의 생략</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>r</p></td><td width="375" bgcolor="#f2f2f2"><p>단지 한 글자만 변경(입력 모드로 바뀌지 않음)</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>R</p></td><td width="375" bgcolor="#f2f2f2"><p>입력하는 대로 겹쳐 써서 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>s</p></td><td width="375" bgcolor="#f2f2f2"><p>삽입에 의해 한 단어의 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>C</p></td><td width="375" bgcolor="#f2f2f2"><p>커서의 위치로부터 줄 끝까지 삽입에 의한 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>cc</p></td><td width="375" bgcolor="#f2f2f2"><p>전체 줄을 삽입에 의한 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>S</p></td><td width="375" bgcolor="#f2f2f2"><p>전체 줄을 삽입에 의한 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>cmove</p></td><td width="375" bgcolor="#f2f2f2"><p>커서부터 move까지 삽입에 의해 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>~</p></td><td width="375" bgcolor="#f2f2f2"><p>대,소문자 바꾸기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>u</p></td><td width="375" bgcolor="#f2f2f2"><p>편집 버퍼를 수정했던 마지막 명령을 취소</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>U</p></td><td width="375" bgcolor="#f2f2f2"><p>현재 줄을 저장</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>.</p></td><td width="375" bgcolor="#f2f2f2"><p>편집 버퍼를 수정했던 마지막 명령 반복</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>x</p></td><td width="375" bgcolor="#f2f2f2"><p>커서가 있는 문자 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>X</p></td><td width="375" bgcolor="#f2f2f2"><p>커서의 왼쪽 문자 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>D</p></td><td width="375" bgcolor="#f2f2f2"><p>커서부터 줄의 끝까지 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>dd</p></td><td width="375" bgcolor="#f2f2f2"><p>현재 줄의 전체 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>dmove</p></td><td width="375" bgcolor="#f2f2f2"><p>커서부터 move까지 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde" height="17"><p>dG</p></td><td width="375" bgcolor="#f2f2f2" height="17"><p>커서부터 편집 버퍼의 끝까지 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>d1G</p></td><td width="375" bgcolor="#f2f2f2"><p>커서부터 편집 버퍼의 맨 앞까지 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;d</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 줄의 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;,&lt;line&gt;d</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 범위의 삭제</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;co&lt;target&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 줄을 복사하여 target 줄 밑에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;, &lt;line&gt;co&lt;target&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 범위를 복사하여 target 줄 밑에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;m&lt;target?</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 줄로 이동하여 target 줄 밑에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;, &lt;line&gt;m&lt;target&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 범위로 이동하여target 줄 밑에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>&lt;n&gt;!!command</p></td><td width="375" bgcolor="#f2f2f2"><p>n번 줄에서 command의 실행</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>!move command</p></td><td width="375" bgcolor="#f2f2f2"><p>커서부터 move까지 command 실행</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>!move fmt</p></td><td width="375" bgcolor="#f2f2f2"><p>커서부터 move까지 줄들을 형식 맞추기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:w</p></td><td width="375" bgcolor="#f2f2f2"><p>원래의 파일로 데이터를 저장</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:w file</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 파일로 데이터를 저장</p></td></tr><tr><td width="37%" bgcolor="#dedfde" height="14"><p>:w&gt;&gt; file <br />
</p></td><td width="375" bgcolor="#f2f2f2" height="14"><p>지정한 파일에 데이터를 추가</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:wq</p></td><td width="375" bgcolor="#f2f2f2"><p>데이터를 저장하고 종료</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:q!</p></td><td width="375" bgcolor="#f2f2f2"><p>데이터를 저장하지 않고 종료</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:set number</p></td><td width="375" bgcolor="#f2f2f2"><p>내부 줄 번호 디스플레이<br />
</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:set nonumber</p></td><td width="375" bgcolor="#f2f2f2"><p>내부 줄 번호 디스플레이 않기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>p</p></td><td width="375" bgcolor="#f2f2f2"><p>마지막으로 지워진 것을 커서의 뒤/아래에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>P</p></td><td width="375" bgcolor="#f2f2f2"><p>마지막으로 지워진 것을 커서의 앞/위에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>xp</p></td><td width="375" bgcolor="#f2f2f2"><p>두 문자를 바꿈</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>deep</p></td><td width="375" bgcolor="#f2f2f2"><p>두 단어를 바꿈</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>ddp</p></td><td width="375" bgcolor="#f2f2f2"><p>두 줄을 바꿈</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>/rexp</p></td><td width="375" bgcolor="#f2f2f2"><p>지정된 정규 표현식에 대해 앞으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>/</p></td><td width="375" bgcolor="#f2f2f2"><p>이전의 패턴에 대해 앞으로 검색을 반복</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>?rexp</p></td><td width="375" bgcolor="#f2f2f2"><p>지정된 정규 표현식에 대해 뒤로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>?</p></td><td width="375" bgcolor="#f2f2f2"><p>이전의 패턴에 대해 뒤로 검색을 반복</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>n</p></td><td width="375" bgcolor="#f2f2f2"><p>/나 ?명령에 대해 같은 방향으로 반복</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>N</p></td><td width="375" bgcolor="#f2f2f2"><p>/나 ?명령에 대해 반대 방향으로 반복</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:ab short long</p></td><td width="375" bgcolor="#f2f2f2"><p>short를 long에 대한 약어로 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:ab</p></td><td width="375" bgcolor="#f2f2f2"><p>현재 약어 목록을 표시</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:una short </p></td><td width="375" bgcolor="#f2f2f2"><p>약어 short를 표시</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>r&lt;Return&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>문자를 뉴라인으로 변경</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>J</p></td><td width="375" bgcolor="#f2f2f2"><p>아래 line을 현재 line과 합치기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:set wm=n</p></td><td width="375" bgcolor="#f2f2f2"><p>오른쪽으로 n문자 위치에서 자동적으로 줄 나눔</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>h or &lt;Left key&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 한 칸 왼쪽으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>j or &lt;Down key&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 한 줄 아래로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>k or &lt;Up key&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 한 줄 위로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>l or &lt;Right key&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 한 칸 오른쪽으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>&lt;Backspace&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 한 칸 왼쪽으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>&lt;Space&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 한 칸 오른쪽으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>-</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 이전 줄의 처음으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>+</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 다음 줄의 처음으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>&lt;Return&gt; </p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 다음 줄의 처음으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>0</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 현재 줄의 맨 앞으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>$</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 현재 줄의 맨 끝으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>^</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 현재 줄의 첫글자(공백이나 탭이 아닌)로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>w</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 다음 단어의 첫 글자로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>e</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 다음 단어의 끝 글자로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>b</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 이전 단어의 첫 글자로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>W</p></td><td width="375" bgcolor="#f2f2f2"><p>w와 같음(문장 부호 무시)</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>E</p></td><td width="375" bgcolor="#f2f2f2"><p>e와 같음(문장 부호 무시)</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>B</p></td><td width="375" bgcolor="#f2f2f2"><p>b와 같음(문장 부호 무시)</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>(</p></td><td width="375" bgcolor="#f2f2f2"><p>다음 문장의 처음으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>)</p></td><td width="375" bgcolor="#f2f2f2"><p>이전 문장의 처음으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>{</p></td><td width="375" bgcolor="#f2f2f2"><p>다음 문단의 처음으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>}</p></td><td width="375" bgcolor="#f2f2f2"><p>이전 문단의 처음으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>H</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 화면 맨 위로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>M</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 중간으로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>L</p></td><td width="375" bgcolor="#f2f2f2"><p>커서를 맨 아래로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>^f</p></td><td width="375" bgcolor="#f2f2f2"><p>한 화면 아래로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>^b </p></td><td width="375" bgcolor="#f2f2f2"><p>화면 위로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>^d</p></td><td width="375" bgcolor="#f2f2f2"><p>반 화면 아래로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>^u</p></td><td width="375" bgcolor="#f2f2f2"><p>반 화면 위로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>n^d</p></td><td width="375" bgcolor="#f2f2f2"><p>n줄만큼 아래로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>n^u</p></td><td width="375" bgcolor="#f2f2f2"><p>n줄만큼 위로 이동</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:!command</p></td><td width="375" bgcolor="#f2f2f2"><p>vi를 중단하고 지정한 셸 명령을 실행</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:!!</p></td><td width="375" bgcolor="#f2f2f2"><p>vi를 중단하고 이전의 셸 명령을 실행</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:sh</p></td><td width="375" bgcolor="#f2f2f2"><p>vi를 중단하고 셸을 실행</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:!csh</p></td><td width="375" bgcolor="#f2f2f2"><p>vi를 중단하고 새로운 C-셸을 실행</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:s/&lt;pattern&gt;/&lt;replace&gt;/</p></td><td width="375" bgcolor="#f2f2f2"><p>현재 줄의 치환</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;s/&lt;pattern&gt;/&lt;replace&gt;/</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 줄의 치환</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;,&lt;line&gt;s/&lt;pattern&gt;/&lt;replace&gt;/&nbsp;</p></td><td width="375" bgcolor="#f2f2f2"><p>정한 범위의 치환</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:%s/&lt;pattern&gt;/&lt;replace&gt;/</p></td><td width="375" bgcolor="#f2f2f2"><p>모든 줄의 치환</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;r file</p></td><td width="375" bgcolor="#f2f2f2"><p>file의 내용을 지정한 줄 다음에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:r file</p></td><td width="375" bgcolor="#f2f2f2"><p>file의 내용을 현재의 줄 다음에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:&lt;line&gt;r !command</p></td><td width="375" bgcolor="#f2f2f2"><p>command의 결과를 지정한 줄 다음에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:r !command</p></td><td width="375" bgcolor="#f2f2f2"><p>command의 결과를 현재의 줄 다음에 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:r !look pattern</p></td><td width="375" bgcolor="#f2f2f2"><p>지정한 pattern으로 시작된 단어 삽입</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>.</p></td><td width="375" bgcolor="#f2f2f2"><p>뉴라인을 제외한 모든 단일 문자와 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>*</p></td><td width="375" bgcolor="#f2f2f2"><p>영 또는 그 이상의 선행 문자와 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>^</p></td><td width="375" bgcolor="#f2f2f2"><p>줄의 시작과 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>$</p></td><td width="375" bgcolor="#f2f2f2"><p>줄의 끝과 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>\&lt;</p></td><td width="375" bgcolor="#f2f2f2"><p>단어의 시작과 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>\&gt;</p></td><td width="375" bgcolor="#f2f2f2"><p>단어의 끝과 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>[ ]</p></td><td width="375" bgcolor="#f2f2f2"><p>묶여진 문자중의 하나와 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>[^ ]</p></td><td width="375" bgcolor="#f2f2f2"><p>묶여진 문자를 제외한 아무것하고나 대응</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>\</p></td><td width="375" bgcolor="#f2f2f2"><p>이어지는 기호를 문자 그대로 해석</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>&lt;n&gt;G</p></td><td width="375" bgcolor="#f2f2f2"><p>줄번호 n으로 건너뛰기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>1G</p></td><td width="375" bgcolor="#f2f2f2"><p>편집 버퍼의 첫 줄로 건너뛰기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>G</p></td><td width="375" bgcolor="#f2f2f2"><p>편집 버퍼의 마지막 줄로 건너뛰기</p></td></tr><tr><td width="37%" bgcolor="#dedfde"><p>:map g lG</p></td><td width="375" bgcolor="#f2f2f2"><p>g가 lG와 같도록 매크로 정의</p></td></tr><tr><td colspan="2"><hr width="100%" size="1"></td></tr></tbody></table></div>			 ]]> 
		</description>
		<category>TIP-Linux</category>

		<comments>http://dojeun.egloos.com/457173#comments</comments>
		<pubDate>Thu, 19 Oct 2006 02:26:08 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 자바 문자열 엔코딩 테스트 모음 ]]> </title>
		<link>http://dojeun.egloos.com/453959</link>
		<guid>http://dojeun.egloos.com/453959</guid>
		<description>
			<![CDATA[ 
  <p><br />
<strong>정리일자 : 2006.10.18(수)<br />
정리자 : 제갈장비</strong><br />
</p><br />
<p><br />
<strong>자바 문자열 엔코딩 테스트 모음</strong><br />
<br />
&nbsp;&nbsp;String strTITLE01="";<br />
&nbsp;&nbsp;String strTITLE02="";<br />
&nbsp;&nbsp;String strTITLE03="";<br />
&nbsp;&nbsp;String strTITLE04="";<br />
&nbsp;&nbsp;String strTITLE05="";<br />
&nbsp;&nbsp;String strTITLE06="";<br />
&nbsp;&nbsp;String strTITLE07="";<br />
&nbsp;&nbsp;String strTITLE08="";<br />
&nbsp;&nbsp;String strTITLE09="";<br />
&nbsp;&nbsp;String strTITLE10="";<br />
&nbsp;&nbsp;String strTITLE11="";<br />
&nbsp;&nbsp;String strTITLE12="";<br />
&nbsp;&nbsp;String strTITLE13="";<br />
<br />
&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;strTITLE01 = new String(title.getBytes("Shift_JIS"),"ISO-8859-1");<br />
&nbsp;&nbsp;&nbsp;strTITLE02 = new String(title.getBytes("Shift_JIS"),"EUC-JP");<br />
&nbsp;&nbsp;&nbsp;strTITLE03 = new String(title.getBytes("Shift_JIS"),"EUCJIS");<br />
&nbsp;&nbsp;&nbsp;strTITLE04 = new String(title.getBytes("Shift_JIS"),"UTF-8");<br />
&nbsp;&nbsp;&nbsp;strTITLE05 = new String(title.getBytes("ISO-8859-1"),"Shift_JIS");<br />
&nbsp;&nbsp;&nbsp;strTITLE06 = new String(title.getBytes("ISO-8859-1"),"EUC-JP");<br />
&nbsp;&nbsp;&nbsp;strTITLE07 = new String(title.getBytes("ISO-8859-1"),"EUCJIS");<br />
&nbsp;&nbsp;&nbsp;strTITLE08 = new String(title.getBytes("ISO-8859-1"),"UTF-8");<br />
&nbsp;&nbsp;&nbsp;strTITLE09 = new String(title.getBytes("ISO-8859-1"),"ISO-8859-1");<br />
&nbsp;&nbsp;&nbsp;strTITLE10= new String(title.getBytes("UTF-8"),"Shift_JIS");<br />
&nbsp;&nbsp;&nbsp;strTITLE11= new String(title.getBytes("UTF-8"),"EUC-JP");<br />
&nbsp;&nbsp;&nbsp;strTITLE12= new String(title.getBytes("UTF-8"),"MS932");<br />
&nbsp;&nbsp;&nbsp;strTITLE13= new String(title.getBytes("UTF-8"),"UTF-8");<br />
<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE01);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE02);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE03);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE04);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE05);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE06);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE07);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE08);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE09);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE10);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE11);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE12);<br />
&nbsp;&nbsp;&nbsp;System.out.println(strTITLE13);<br />
&nbsp;&nbsp;} catch (UnsupportedEncodingException e) {<br />
&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />
&nbsp;&nbsp;} </p><p align="center">- 끝 -</p>			 ]]> 
		</description>
		<category>제갈장비-JAVA</category>

		<comments>http://dojeun.egloos.com/453959#comments</comments>
		<pubDate>Wed, 18 Oct 2006 06:00:43 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ PostgreSql - Data Type Formatting Functions ]]> </title>
		<link>http://dojeun.egloos.com/428874</link>
		<guid>http://dojeun.egloos.com/428874</guid>
		<description>
			<![CDATA[ 
  <div class="sect1" lang="en"><div class="titlepage"><h2 class="title" style="CLEAR: both"><a name="functions-formatting"></a>9.8.&nbsp;Data Type Formatting Functions</h2><br />
<br />
</div><a name="id555699"></a><a name="id555705"></a><a name="id555712"></a><a name="id555718"></a><a name="id555724"></a><p>The <span class="productname">PostgreSQL</span> formatting functions provide a powerful set of tools for converting various data types (date/time, integer, floating point, numeric) to formatted strings and for converting from formatted strings to specific data types. <a title="Table&nbsp;9.20.&nbsp;Formatting Functions" href="mk:@MSITStore:C:\Program%20Files\PostgreSQL\8.1\pgAdmin%20III\docs\en_US\pgadmin3.chm::/pg/functions-formatting.html#functions-formatting-table">Table&nbsp;9.20, “Formatting Functions”</a> lists them. These functions all follow a common calling convention: the first argument is the value to be formatted and the second argument is a template that defines the output or input format. </p><p>The <code class="function">to_timestamp</code> function can also take a single <code class="type">double precision</code> argument to convert from Unix epoch to <code class="type">timestamp with time zone</code>. (<code class="type">Integer</code> Unix epochs are implicitly cast to <code class="type">double precision</code>.) </p><div class="table"><a name="functions-formatting-table"></a><p class="title"><b>Table&nbsp;9.20.&nbsp;Formatting Functions</b></p><table summary="Formatting Functions" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Function</th><th>Return Type</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code class="literal"><code class="function">to_char</code>(<code class="type">timestamp</code>, <code class="type">text</code>)</code></td><td><code class="type">text</code></td><td>convert time stamp to string</td><td><code class="literal">to_char(current_timestamp, 'HH12:MI:SS')</code></td></tr><tr><td><code class="literal"><code class="function">to_char</code>(<code class="type">interval</code>, <code class="type">text</code>)</code></td><td><code class="type">text</code></td><td>convert interval to string</td><td><code class="literal">to_char(interval '15h&nbsp;2m&nbsp;12s', 'HH24:MI:SS')</code></td></tr><tr><td><code class="literal"><code class="function">to_char</code>(<code class="type">int</code>, <code class="type">text</code>)</code></td><td><code class="type">text</code></td><td>convert integer to string</td><td><code class="literal">to_char(125, '999')</code></td></tr><tr><td><code class="literal"><code class="function">to_char</code>(<code class="type">double precision</code>, <code class="type">text</code>)</code></td><td><code class="type">text</code></td><td>convert real/double precision to string</td><td><code class="literal">to_char(125.8::real, '999D9')</code></td></tr><tr><td><code class="literal"><code class="function">to_char</code>(<code class="type">numeric</code>, <code class="type">text</code>)</code></td><td><code class="type">text</code></td><td>convert numeric to string</td><td><code class="literal">to_char(-125.8, '999D99S')</code></td></tr><tr><td><code class="literal"><code class="function">to_date</code>(<code class="type">text</code>, <code class="type">text</code>)</code></td><td><code class="type">date</code></td><td>convert string to date</td><td><code class="literal">to_date('05&nbsp;Dec&nbsp;2000', 'DD&nbsp;Mon&nbsp;YYYY')</code></td></tr><tr><td><code class="literal"><code class="function">to_timestamp</code>(<code class="type">text</code>, <code class="type">text</code>)</code></td><td><code class="type">timestamp with time zone</code></td><td>convert string to time stamp</td><td><code class="literal">to_timestamp('05&nbsp;Dec&nbsp;2000', 'DD&nbsp;Mon&nbsp;YYYY')</code></td></tr><tr><td><code class="literal"><code class="function">to_timestamp</code>(<code class="type">double precision</code>)</code></td><td><code class="type">timestamp with time zone</code></td><td>convert UNIX epoch to time stamp</td><td><code class="literal">to_timestamp(200120400)</code></td></tr><tr><td><code class="literal"><code class="function">to_number</code>(<code class="type">text</code>, <code class="type">text</code>)</code></td><td><code class="type">numeric</code></td><td>convert string to numeric</td><td><code class="literal">to_number('12,454.8-', '99G999D9S')</code></td></tr></tbody></table></div><p>In an output template string (for <code class="function">to_char</code>), there are certain patterns that are recognized and replaced with appropriately-formatted data from the value to be formatted. Any text that is not a template pattern is simply copied verbatim. Similarly, in an input template string (for anything but <code class="function">to_char</code>), template patterns identify the parts of the input data string to be looked at and the values to be found there. </p><p><a title="Table&nbsp;9.21.&nbsp;Template Patterns for Date/Time Formatting" href="mk:@MSITStore:C:\Program%20Files\PostgreSQL\8.1\pgAdmin%20III\docs\en_US\pgadmin3.chm::/pg/functions-formatting.html#functions-formatting-datetime-table">Table&nbsp;9.21, “Template Patterns for Date/Time Formatting”</a> shows the template patterns available for formatting date and time values. </p><div class="table"><a name="functions-formatting-datetime-table"></a><p class="title"><b>Table&nbsp;9.21.&nbsp;Template Patterns for Date/Time Formatting</b></p><table summary="Template Patterns for Date/Time Formatting" border="1"><colgroup><col><col></colgroup><thead><tr><th>Pattern</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">HH</code></td><td>hour of day (01-12)</td></tr><tr><td><code class="literal">HH12</code></td><td>hour of day (01-12)</td></tr><tr><td><code class="literal">HH24</code></td><td>hour of day (00-23)</td></tr><tr><td><code class="literal">MI</code></td><td>minute (00-59)</td></tr><tr><td><code class="literal">SS</code></td><td>second (00-59)</td></tr><tr><td><code class="literal">MS</code></td><td>millisecond (000-999)</td></tr><tr><td><code class="literal">US</code></td><td>microsecond (000000-999999)</td></tr><tr><td><code class="literal">SSSS</code></td><td>seconds past midnight (0-86399)</td></tr><tr><td><code class="literal">AM</code> or <code class="literal">A.M.</code> or <code class="literal">PM</code> or <code class="literal">P.M.</code> </td><td>meridian indicator (uppercase)</td></tr><tr><td><code class="literal">am</code> or <code class="literal">a.m.</code> or <code class="literal">pm</code> or <code class="literal">p.m.</code> </td><td>meridian indicator (lowercase)</td></tr><tr><td><code class="literal">Y,YYY</code></td><td>year (4 and more digits) with comma</td></tr><tr><td><code class="literal">YYYY</code></td><td>year (4 and more digits)</td></tr><tr><td><code class="literal">YYY</code></td><td>last 3 digits of year</td></tr><tr><td><code class="literal">YY</code></td><td>last 2 digits of year</td></tr><tr><td><code class="literal">Y</code></td><td>last digit of year</td></tr><tr><td><code class="literal">IYYY</code></td><td>ISO year (4 and more digits)</td></tr><tr><td><code class="literal">IYY</code></td><td>last 3 digits of ISO year</td></tr><tr><td><code class="literal">IY</code></td><td>last 2 digits of ISO year</td></tr><tr><td><code class="literal">I</code></td><td>last digits of ISO year</td></tr><tr><td><code class="literal">BC</code> or <code class="literal">B.C.</code> or <code class="literal">AD</code> or <code class="literal">A.D.</code> </td><td>era indicator (uppercase)</td></tr><tr><td><code class="literal">bc</code> or <code class="literal">b.c.</code> or <code class="literal">ad</code> or <code class="literal">a.d.</code> </td><td>era indicator (lowercase)</td></tr><tr><td><code class="literal">MONTH</code></td><td>full uppercase month name (blank-padded to 9 chars)</td></tr><tr><td><code class="literal">Month</code></td><td>full mixed-case month name (blank-padded to 9 chars)</td></tr><tr><td><code class="literal">month</code></td><td>full lowercase month name (blank-padded to 9 chars)</td></tr><tr><td><code class="literal">MON</code></td><td>abbreviated uppercase month name (3 chars)</td></tr><tr><td><code class="literal">Mon</code></td><td>abbreviated mixed-case month name (3 chars)</td></tr><tr><td><code class="literal">mon</code></td><td>abbreviated lowercase month name (3 chars)</td></tr><tr><td><code class="literal">MM</code></td><td>month number (01-12)</td></tr><tr><td><code class="literal">DAY</code></td><td>full uppercase day name (blank-padded to 9 chars)</td></tr><tr><td><code class="literal">Day</code></td><td>full mixed-case day name (blank-padded to 9 chars)</td></tr><tr><td><code class="literal">day</code></td><td>full lowercase day name (blank-padded to 9 chars)</td></tr><tr><td><code class="literal">DY</code></td><td>abbreviated uppercase day name (3 chars)</td></tr><tr><td><code class="literal">Dy</code></td><td>abbreviated mixed-case day name (3 chars)</td></tr><tr><td><code class="literal">dy</code></td><td>abbreviated lowercase day name (3 chars)</td></tr><tr><td><code class="literal">DDD</code></td><td>day of year (001-366)</td></tr><tr><td><code class="literal">DD</code></td><td>day of month (01-31)</td></tr><tr><td><code class="literal">D</code></td><td>day of week (1-7; Sunday is 1)</td></tr><tr><td><code class="literal">W</code></td><td>week of month (1-5) (The first week starts on the first day of the month.)</td></tr><tr><td><code class="literal">WW</code></td><td>week number of year (1-53) (The first week starts on the first day of the year.)</td></tr><tr><td><code class="literal">IW</code></td><td>ISO week number of year (The first Thursday of the new year is in week 1.)</td></tr><tr><td><code class="literal">CC</code></td><td>century (2 digits)</td></tr><tr><td><code class="literal">J</code></td><td>Julian Day (days since January 1, 4712 BC)</td></tr><tr><td><code class="literal">Q</code></td><td>quarter</td></tr><tr><td><code class="literal">RM</code></td><td>month in Roman numerals (I-XII; I=January) (uppercase)</td></tr><tr><td><code class="literal">rm</code></td><td>month in Roman numerals (i-xii; i=January) (lowercase)</td></tr><tr><td><code class="literal">TZ</code></td><td>time-zone name (uppercase)</td></tr><tr><td><code class="literal">tz</code></td><td>time-zone name (lowercase)</td></tr></tbody></table></div><p>Certain modifiers may be applied to any template pattern to alter its behavior. For example, <code class="literal">FMMonth</code> is the <code class="literal">Month</code> pattern with the <code class="literal">FM</code> modifier. <a title="Table&nbsp;9.22.&nbsp;Template Pattern Modifiers for Date/Time Formatting" href="mk:@MSITStore:C:\Program%20Files\PostgreSQL\8.1\pgAdmin%20III\docs\en_US\pgadmin3.chm::/pg/functions-formatting.html#functions-formatting-datetimemod-table">Table&nbsp;9.22, “Template Pattern Modifiers for Date/Time Formatting”</a> shows the modifier patterns for date/time formatting. </p><div class="table"><a name="functions-formatting-datetimemod-table"></a><p class="title"><b>Table&nbsp;9.22.&nbsp;Template Pattern Modifiers for Date/Time Formatting</b></p><table summary="Template Pattern Modifiers for Date/Time Formatting" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Modifier</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code class="literal">FM</code> prefix</td><td>fill mode (suppress padding blanks and zeroes)</td><td><code class="literal">FMMonth</code></td></tr><tr><td><code class="literal">TH</code> suffix</td><td>uppercase ordinal number suffix</td><td><code class="literal">DDTH</code></td></tr><tr><td><code class="literal">th</code> suffix</td><td>lowercase ordinal number suffix</td><td><code class="literal">DDth</code></td></tr><tr><td><code class="literal">FX</code> prefix</td><td>fixed format global option (see usage notes)</td><td><code class="literal">FX&nbsp;Month&nbsp;DD&nbsp;Day</code></td></tr><tr><td><code class="literal">SP</code> suffix</td><td>spell mode (not yet implemented)</td><td><code class="literal">DDSP</code></td></tr></tbody></table></div><p>Usage notes for date/time formatting: </p><div class="itemizedlist"><ul type="disc"><li><p><code class="literal">FM</code> suppresses leading zeroes and trailing blanks that would otherwise be added to make the output of a pattern be fixed-width. </p><li><p><code class="function">to_timestamp</code> and <code class="function">to_date</code> skip multiple blank spaces in the input string if the <code class="literal">FX</code> option is not used. <code class="literal">FX</code> must be specified as the first item in the template. For example <code class="literal">to_timestamp('2000&nbsp;&nbsp;&nbsp;&nbsp;JUN', 'YYYY MON')</code> is correct, but <code class="literal">to_timestamp('2000&nbsp;&nbsp;&nbsp;&nbsp;JUN', 'FXYYYY MON')</code> returns an error, because <code class="function">to_timestamp</code> expects one space only. </p><li><p>Ordinary text is allowed in <code class="function">to_char</code> templates and will be output literally. You can put a substring in double quotes to force it to be interpreted as literal text even if it contains pattern key words. For example, in <code class="literal">'"Hello Year "YYYY'</code>, the <code class="literal">YYYY</code> will be replaced by the year data, but the single <code class="literal">Y</code> in <code class="literal">Year</code> will not be. </p><li><p>If you want to have a double quote in the output you must precede it with a backslash, for example <code class="literal">'\\"YYYY Month\\"'</code>. (Two backslashes are necessary because the backslash already has a special meaning in a string constant.) </p><li><p>The <code class="literal">YYYY</code> conversion from string to <code class="type">timestamp</code> or <code class="type">date</code> has a restriction if you use a year with more than 4 digits. You must use some non-digit character or template after <code class="literal">YYYY</code>, otherwise the year is always interpreted as 4 digits. For example (with the year 20000): <code class="literal">to_date('200001131', 'YYYYMMDD')</code> will be interpreted as a 4-digit year; instead use a non-digit separator after the year, like <code class="literal">to_date('20000-1131', 'YYYY-MMDD')</code> or <code class="literal">to_date('20000Nov31', 'YYYYMonDD')</code>. </p><li><p>In conversions from string to <code class="type">timestamp</code> or <code class="type">date</code>, the <code class="literal">CC</code> field is ignored if there is a <code class="literal">YYY</code>, <code class="literal">YYYY</code> or <code class="literal">Y,YYY</code> field. If <code class="literal">CC</code> is used with <code class="literal">YY</code> or <code class="literal">Y</code> then the year is computed as <code class="literal">(CC-1)*100+YY</code>. </p><li><p>Millisecond (<code class="literal">MS</code>) and microsecond (<code class="literal">US</code>) values in a conversion from string to <code class="type">timestamp</code> are used as part of the seconds after the decimal point. For example <code class="literal">to_timestamp('12:3', 'SS:MS')</code> is not 3 milliseconds, but 300, because the conversion counts it as 12 + 0.3 seconds. This means for the format <code class="literal">SS:MS</code>, the input values <code class="literal">12:3</code>, <code class="literal">12:30</code>, and <code class="literal">12:300</code> specify the same number of milliseconds. To get three milliseconds, one must use <code class="literal">12:003</code>, which the conversion counts as 12 + 0.003 = 12.003 seconds. </p><p>Here is a more complex example: <code class="literal">to_timestamp('15:12:02.020.001230', 'HH:MI:SS.MS.US')</code> is 15 hours, 12 minutes, and 2 seconds + 20 milliseconds + 1230 microseconds = 2.021230 seconds. </p><li><p><code class="function">to_char</code>'s day of the week numbering (see the 'D' formatting pattern) is different from that of the <code class="function">extract</code> function. </p><li><p><code class="function">to_char(interval)</code> formats <code class="literal">HH</code> and <code class="literal">HH12</code> as hours in a single day, while <code class="literal">HH24</code> can output hours exceeding a single day, e.g. &gt;24. </p></li></ul></div><p></p><p><a title="Table&nbsp;9.23.&nbsp;Template Patterns for Numeric Formatting" href="mk:@MSITStore:C:\Program%20Files\PostgreSQL\8.1\pgAdmin%20III\docs\en_US\pgadmin3.chm::/pg/functions-formatting.html#functions-formatting-numeric-table">Table&nbsp;9.23, “Template Patterns for Numeric Formatting”</a> shows the template patterns available for formatting numeric values. </p><div class="table"><a name="functions-formatting-numeric-table"></a><p class="title"><b>Table&nbsp;9.23.&nbsp;Template Patterns for Numeric Formatting</b></p><table summary="Template Patterns for Numeric Formatting" border="1"><colgroup><col><col></colgroup><thead><tr><th>Pattern</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">9</code></td><td>value with the specified number of digits</td></tr><tr><td><code class="literal">0</code></td><td>value with leading zeros</td></tr><tr><td><code class="literal">.</code> (period)</td><td>decimal point</td></tr><tr><td><code class="literal">,</code> (comma)</td><td>group (thousand) separator</td></tr><tr><td><code class="literal">PR</code></td><td>negative value in angle brackets</td></tr><tr><td><code class="literal">S</code></td><td>sign anchored to number (uses locale)</td></tr><tr><td><code class="literal">L</code></td><td>currency symbol (uses locale)</td></tr><tr><td><code class="literal">D</code></td><td>decimal point (uses locale)</td></tr><tr><td><code class="literal">G</code></td><td>group separator (uses locale)</td></tr><tr><td><code class="literal">MI</code></td><td>minus sign in specified position (if number &lt; 0)</td></tr><tr><td><code class="literal">PL</code></td><td>plus sign in specified position (if number &gt; 0)</td></tr><tr><td><code class="literal">SG</code></td><td>plus/minus sign in specified position</td></tr><tr><td><code class="literal">RN</code></td><td>roman numeral (input between 1 and 3999)</td></tr><tr><td><code class="literal">TH</code> or <code class="literal">th</code> </td><td>ordinal number suffix</td></tr><tr><td><code class="literal">V</code></td><td>shift specified number of digits (see notes)</td></tr><tr><td><code class="literal">EEEE</code></td><td>scientific notation (not implemented yet)</td></tr></tbody></table></div><p>Usage notes for numeric formatting: </p><div class="itemizedlist"><ul type="disc"><li><p>A sign formatted using <code class="literal">SG</code>, <code class="literal">PL</code>, or <code class="literal">MI</code> is not anchored to the number; for example, <code class="literal">to_char(-12, 'S9999')</code> produces <code class="literal">'&nbsp;&nbsp;-12'</code>, but <code class="literal">to_char(-12, 'MI9999')</code> produces <code class="literal">'-&nbsp;&nbsp;12'</code>. The Oracle implementation does not allow the use of <code class="literal">MI</code> ahead of <code class="literal">9</code>, but rather requires that <code class="literal">9</code> precede <code class="literal">MI</code>. </p><li><p><code class="literal">9</code> results in a value with the same number of digits as there are <code class="literal">9</code>s. If a digit is not available it outputs a space. </p><li><p><code class="literal">TH</code> does not convert values less than zero and does not convert fractional numbers. </p><li><p><code class="literal">PL</code>, <code class="literal">SG</code>, and <code class="literal">TH</code> are <span class="productname">PostgreSQL</span> extensions. </p><li><p><code class="literal">V</code> effectively multiplies the input values by <code class="literal">10^<em class="replaceable"><code>n</code></em></code>, where <em class="replaceable"><code>n</code></em> is the number of digits following <code class="literal">V</code>. <code class="function">to_char</code> does not support the use of <code class="literal">V</code> combined with a decimal point. (E.g., <code class="literal">99.9V99</code> is not allowed.) </p></li></ul></div><p></p><p><a title="Table&nbsp;9.24.&nbsp;to_char Examples" href="mk:@MSITStore:C:\Program%20Files\PostgreSQL\8.1\pgAdmin%20III\docs\en_US\pgadmin3.chm::/pg/functions-formatting.html#functions-formatting-examples-table">Table&nbsp;9.24, “<code class="function">to_char</code> Examples”</a> shows some examples of the use of the <code class="function">to_char</code> function. </p><div class="table"><a name="functions-formatting-examples-table"></a><p class="title"><b>Table&nbsp;9.24.&nbsp;<code class="function">to_char</code> Examples</b></p><table summary="to_char Examples" border="1"><colgroup><col><col></colgroup><thead><tr><th>Expression</th><th>Result</th></tr></thead><tbody><tr><td><code class="literal">to_char(current_timestamp, 'Day,&nbsp;DD&nbsp;&nbsp;HH12:MI:SS')</code></td><td><code class="literal">'Tuesday&nbsp;&nbsp;,&nbsp;06&nbsp;&nbsp;05:39:18'</code></td></tr><tr><td><code class="literal">to_char(current_timestamp, 'FMDay,&nbsp;FMDD&nbsp;&nbsp;HH12:MI:SS')</code></td><td><code class="literal">'Tuesday,&nbsp;6&nbsp;&nbsp;05:39:18'</code></td></tr><tr><td><code class="literal">to_char(-0.1, '99.99')</code></td><td><code class="literal">'&nbsp;&nbsp;-.10'</code></td></tr><tr><td><code class="literal">to_char(-0.1, 'FM9.99')</code></td><td><code class="literal">'-.1'</code></td></tr><tr><td><code class="literal">to_char(0.1, '0.9')</code></td><td><code class="literal">'&nbsp;0.1'</code></td></tr><tr><td><code class="literal">to_char(12, '9990999.9')</code></td><td><code class="literal">'&nbsp;&nbsp;&nbsp;&nbsp;0012.0'</code></td></tr><tr><td><code class="literal">to_char(12, 'FM9990999.9')</code></td><td><code class="literal">'0012.'</code></td></tr><tr><td><code class="literal">to_char(485, '999')</code></td><td><code class="literal">'&nbsp;485'</code></td></tr><tr><td><code class="literal">to_char(-485, '999')</code></td><td><code class="literal">'-485'</code></td></tr><tr><td><code class="literal">to_char(485, '9&nbsp;9&nbsp;9')</code></td><td><code class="literal">'&nbsp;4&nbsp;8&nbsp;5'</code></td></tr><tr><td><code class="literal">to_char(1485, '9,999')</code></td><td><code class="literal">'&nbsp;1,485'</code></td></tr><tr><td><code class="literal">to_char(1485, '9G999')</code></td><td><code class="literal">'&nbsp;1&nbsp;485'</code></td></tr><tr><td><code class="literal">to_char(148.5, '999.999')</code></td><td><code class="literal">'&nbsp;148.500'</code></td></tr><tr><td><code class="literal">to_char(148.5, 'FM999.999')</code></td><td><code class="literal">'148.5'</code></td></tr><tr><td><code class="literal">to_char(148.5, 'FM999.990')</code></td><td><code class="literal">'148.500'</code></td></tr><tr><td><code class="literal">to_char(148.5, '999D999')</code></td><td><code class="literal">'&nbsp;148,500'</code></td></tr><tr><td><code class="literal">to_char(3148.5, '9G999D999')</code></td><td><code class="literal">'&nbsp;3&nbsp;148,500'</code></td></tr><tr><td><code class="literal">to_char(-485, '999S')</code></td><td><code class="literal">'485-'</code></td></tr><tr><td><code class="literal">to_char(-485, '999MI')</code></td><td><code class="literal">'485-'</code></td></tr><tr><td><code class="literal">to_char(485, '999MI')</code></td><td><code class="literal">'485&nbsp;'</code></td></tr><tr><td><code class="literal">to_char(485, 'FM999MI')</code></td><td><code class="literal">'485'</code></td></tr><tr><td><code class="literal">to_char(485, 'PL999')</code></td><td><code class="literal">'+485'</code></td></tr><tr><td><code class="literal">to_char(485, 'SG999')</code></td><td><code class="literal">'+485'</code></td></tr><tr><td><code class="literal">to_char(-485, 'SG999')</code></td><td><code class="literal">'-485'</code></td></tr><tr><td><code class="literal">to_char(-485, '9SG99')</code></td><td><code class="literal">'4-85'</code></td></tr><tr><td><code class="literal">to_char(-485, '999PR')</code></td><td><code class="literal">'&lt;485&gt;'</code></td></tr><tr><td><code class="literal">to_char(485, 'L999')</code></td><td><code class="literal">'DM&nbsp;485</code></td></tr><tr><td><code class="literal">to_char(485, 'RN')</code></td><td><code class="literal">'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDLXXXV'</code></td></tr><tr><td><code class="literal">to_char(485, 'FMRN')</code></td><td><code class="literal">'CDLXXXV'</code></td></tr><tr><td><code class="literal">to_char(5.2, 'FMRN')</code></td><td><code class="literal">'V'</code></td></tr><tr><td><code class="literal">to_char(482, '999th')</code></td><td><code class="literal">'&nbsp;482nd'</code></td></tr><tr><td><code class="literal">to_char(485, '"Good&nbsp;number:"999')</code></td><td><code class="literal">'Good&nbsp;number:&nbsp;485'</code></td></tr><tr><td><code class="literal">to_char(485.8, '"Pre:"999"&nbsp;Post:"&nbsp;.999')</code></td><td><code class="literal">'Pre:&nbsp;485&nbsp;Post:&nbsp;.800'</code></td></tr><tr><td><code class="literal">to_char(12, '99V999')</code></td><td><code class="literal">'&nbsp;12000'</code></td></tr><tr><td><code class="literal">to_char(12.4, '99V999')</code></td><td><code class="literal">'&nbsp;12400'</code></td></tr><tr><td><code class="literal">to_char(12.45, '99V9')</code></td><td><code class="literal">'&nbsp;125'</code></td></tr></tbody></table></div></div>			 ]]> 
		</description>
		<category>TIP-PostgreSql</category>

		<comments>http://dojeun.egloos.com/428874#comments</comments>
		<pubDate>Wed, 11 Oct 2006 06:16:46 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[ PostgreSql - 수학 계산 관련 ]]> </title>
		<link>http://dojeun.egloos.com/428790</link>
		<guid>http://dojeun.egloos.com/428790</guid>
		<description>
			<![CDATA[ 
  <span style="FONT-SIZE: 100%">평균구하고, 소숫점 자리수 지정하기<br />
&nbsp;&nbsp;&nbsp; Select round(avg(<em><u>숫자형 필드</u></em>),2)</span><br />
			 ]]> 
		</description>
		<category>TIP-PostgreSql</category>

		<comments>http://dojeun.egloos.com/428790#comments</comments>
		<pubDate>Wed, 11 Oct 2006 05:38:49 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
	<item>
		<title><![CDATA[   postgreSQL - 일자관련팁 ]]> </title>
		<link>http://dojeun.egloos.com/428765</link>
		<guid>http://dojeun.egloos.com/428765</guid>
		<description>
			<![CDATA[ 
  <span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림">문자열을 일자형을 바꾸기<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd')<br />
<br />
문자열을 일자형을 바꾼다음 10초 더하기<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd') + '10'<br />
&nbsp;&nbsp;&nbsp; 혹은<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd') + '10 sec'<br />
<br />
문자열을 일자형을 바꾼다음 10분 더하기<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd') + '10 minute'<br />
<br />
문자열을 일자형을 바꾼다음 10시간 더하기<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd') + '10 hour'<br />
<br />
문자열을 일자형을 바꾼다음 10일 더하기<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd') + '10 day'<br />
<br />
문자열을 일자형을 바꾼다음 10개월 더하기<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd') + '10 month'<br />
<br />
문자열을 일자형을 바꾼다음 10년 더하기<br />
&nbsp;&nbsp;&nbsp; Select to_timestamp('20060902','yyyymmdd') + '10 year' </span><span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림"><br />
<br />
</span><span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림"><br />
<a href="http://dojeun.egloos.com/428874">더 많은 예 참조</a><br />
<br />
------------------------------------------------------<br />
</span><br />
<span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림">일자형 필드를 문자열로 바꾸기(24시간형식으로 표시)</span><br />
<span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림">&nbsp;&nbsp;&nbsp; Select to_char(<u><em>일자형 필드명</em></u>,'yyyymmddhh24')</span><br />
<span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림"></span><br />
<span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림">일자형의 각 요소 표시하기<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select current_timestamp<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'HH')<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'HH12')<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'HH24')<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'MI')<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'SS')<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'MS')<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'US')<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,to_char(current_timestamp, 'SSSS')<span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림"><br />
</span><br />
&nbsp; <br />
</span><br />
<br />
<br />
<br />
<div align="center"><span style="FONT-SIZE: 100%; FONT-FAMILY: 굴림">- 끝 -</span></div>			 ]]> 
		</description>
		<category>TIP-PostgreSql</category>

		<comments>http://dojeun.egloos.com/428765#comments</comments>
		<pubDate>Wed, 11 Oct 2006 05:28:36 GMT</pubDate>
		<dc:creator>제갈장비</dc:creator>
	</item>
</channel>
</rss>
