Problem while inserting a varchar - Mailing list pgsql-novice

From Christian Stalp
Subject Problem while inserting a varchar
Date
Msg-id 47B87D58.3040701@gmx.de
Whole thread Raw
Responses Re: Problem while inserting a varchar  (Michael Glaesemann <grzm@seespotcode.net>)
Re: Problem while inserting a varchar  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: configuring psqlodbc-08.03.0100
Next
From: Michael Glaesemann
Date:
Subject: Re: Problem while inserting a varchar