Problem while inserting a varchar

Поиск
Список
Период
Сортировка
От Christian Stalp
Тема Problem while inserting a varchar
Дата
Msg-id 47B87D58.3040701@gmx.de
обсуждение исходный текст
Ответы Re: Problem while inserting a varchar  (Michael Glaesemann <grzm@seespotcode.net>)
Re: Problem while inserting a varchar  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hello togehter,
I have a problem while writing a string look like this: '0:40:f4:d3:0:0'
into a table.
My table has this structure:
CREATE  TABLE RETRY(
    rid bigserial primary key,
    source_macaddress varchar (40),
    destination_macaddress varchar (40),
    accesspoint integer references ACCESSPOINT(aid),
    retray_day date,
    retry_time time
);

My insert string looks as follows:  INSERT INTO RETRY VALUES (
'0:40:f4:d3:0:0','0:40:f4:d3:0:0',1, 2008-02-17,18:42:05 );

and the postgres-log tells me anything about a invalid input syntax for
the whole number »0:40:f4:d3:0:0«
The first value we have is a bigserial. I thought this is integer-number
which is automatically created by the database? Is that wrong? How can I
create a autogenerated id and how should format an input string that
adapts to that  demand ? I think the real question should be "is
bigserial really auto-generated number?

Thank you

Gruss Christian


В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: configuring psqlodbc-08.03.0100
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Problem while inserting a varchar