database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 4660 게시물 읽기
No. 4660
상수 infinity 는 어떻게 사용하나요?
작성자
1권
작성일
2003-04-14 12:02
조회수
1,168

안녕하세요.

 

그동안 디비 놓구 있다가..

 

이렇게 또 방문했습니다. (질문하러.. ^^--)

 

CREATE TABLE abc (

 

...

expire date DEFAULT 'infinity',

...

 

);

 

이런 식으로 테이블을 생성하려구 하는데요.

 

메뉴얼을 찾아보고 했어요..

 

Constant Description

-----------------------------------------------

epoch 1970-01-01 00:00:00+00 (Unix system time zero)

infinity Later than other valid times

-infinity Earlier than other valid times

invalid Illegal entry

now Current transaction time

today Midnight today

tomorrow Midnight tomorrow

yesterday Midnight yesterday

zulu, allballs, z 00:00:00.00 GMT

 

이렇게 설명이 되어있는데요..

 

그래서 전 무한정 기한이 필요해서..

"infinity"을 디폴트 값으로 잡았죠. ^^--

그런데.. --;;

 

이놈이

ERROR: Unrecognized date external representation 'infinity'

이런 에러를 내는 것입니다.

 

...

 

하기사.. 메뉴얼은

 

PostgreSQL 7.2.1 Documentation

Practical PostgreSQL

Progress SQL-92 Guide and Reference

 

을 보았습니다.

 

제가 사용하는 것은 리눅스 레드헷 8.0 에서

pgsql 7.3.2를 사용합니다.

 

그래서 그런지는 몰라두요..

 

'epoch' 이것은 잘 먹힙니다.

 

어떻게 하면 될까요.

 

그리고 날짜만 저장하는 것 이 필요해서 사용한 것인데..

 

날짜 처리하는데에서..

 

퍼포먼스 면에서 추천해 주실 것 혹시 있나요..

이 글에 대한 댓글이 총 1건 있습니다.

이렇게 올라왔있었네요..

 

--;;

또 다른 것 아시는 분 .. 코맨트라도..

 

> Can someone comment on this? The problem appears in current sources:

 

And for every Postgres release since 1989...

 

> test=> INSERT INTO a VALUES ('infinity');

> ERROR: Unrecognized date external representation 'infinity'

> Is there a reason we support "infinity" in timestamp and not date?

 

Sure. Timestamp features were based on abstime features (at least partly

to support conversions to the newer type), and date features are from

date. "Infinity" for timestamp (or date) is not as compelling as it is

for abstime, which has a very limited range. I've been a fan of those

nifty features, but am not sure they are really necessary now that

PostgreSQL supports NULLs for pass by value types and supports a wider

range in the timestamp type (date has always had a wide range).

 

- Thomas

1권님이 2003-04-14 14:26에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
4664트리거와 룰의 사용에 대해.. [2]
초본데염?
2003-04-14
1417
4662데몬이 32개만 되면 이상현상이.... --;
한성호
2003-04-14
1267
4663┕>Re: 데몬이 32개만 되면 이상현상이.... --;
엠브리오
2003-04-14 15:14:12
1248
4661트랜잭션과 lock [1]
왕초보
2003-04-14
1305
4660상수 infinity 는 어떻게 사용하나요? [1]
1권
2003-04-14
1168
4659serial로 최근 증가한값을 알수 있는 방법? [1]
초본데요.
2003-04-14
1512
4658초보질문입니다. [2]
궁금이
2003-04-14
1135
4657[질문] PostgreSQL 7.2.1 -> 7.3.2 RPM 업그레이드??
왕초보
2003-04-13
1143
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.018초, 이곳 서비스는
	PostgreSQL v16.4로 자료를 관리합니다