Re:
От | Darren Ferguson |
---|---|
Тема | Re: |
Дата | |
Msg-id | Pine.LNX.4.44.0210091045430.20024-100000@thread.crystalballinc.com обсуждение исходный текст |
Ответ на | ("Jeff MacDonald" <jeff@interchange.ca>) |
Ответы |
Unable to convert date to tm
|
Список | pgsql-general |
Yep weird using 7.2.1 and none work on the machine as seen below oss=> create table test (id integer, birthdate date); CREATE oss=> insert into test values (343,'1930-04-27'); INSERT 1283350 1 oss=> insert into test values (345,'1963-09-15'); INSERT 1283351 1 oss=> SELECT id,birthdate FROM users WHERE id IN (343,345); ERROR: Attribute 'id' not found oss=> SELECT id,birthdate FROM test WHERE id IN (343,345); id | birthdate -----+------------ 343 | 1930-04-27 345 | 1963-09-15 (2 rows) oss=> SELECT age('1995-01-01',birthdate) FROM test where id = 343; ERROR: Unable to convert date to tm oss=> SELECT age('1995-01-01',birthdate) FROM test where id = 345; ERROR: Unable to convert date to tm oss=> select version(); version ------------------------------------------------------------- PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96 (1 row) Definately weird On Wed, 9 Oct 2002, Jeff MacDonald wrote: > Hi Folks, > > This problem is occuring on pgsql 7.2.1 as well as 7.2.2. > I have nothing to say except this is VERY weird. Is there something > evil about 1930-04-27 ? > > xxx=>SELECT id,birthdate FROM users WHERE id IN (343,345); > id | birthdate > -----+------------ > 343 | 1930-04-27 > 345 | 1963-09-15 > (2 rows) > > xxx=> SELECT age('1995-01-01',birthdate) FROM users where id =343; > ERROR: Unable to convert date to tm > xxx=> SELECT age('1995-01-01',birthdate) FROM users where id =345; > age > ------------------------------- > 31 years 3 mons 16 days 01:00 > (1 row) > > > > --- > Jeff MacDonald > Interchange Technologies > jeff@interchange.ca > --- > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Darren Ferguson
В списке pgsql-general по дате отправления: