Re: explicit cast error
От | Lynn David Newton |
---|---|
Тема | Re: explicit cast error |
Дата | |
Msg-id | 15654.25975.185001.743040@bela.interhack.net обсуждение исходный текст |
Ответ на | Re: explicit cast error (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
Список | pgsql-general |
To the several people who responded to my "explicit cast" problem, trying to cover all responses in one message. The model input is: insert into abc (c2, lab, dlab, bdigits) values (5, 'somestring', 'abc123', 3410999762); Two or three suggested single quoting the big integer. Didn't work. Two suggested doing 3410999762::bigint. That didn't work either. Another one or two thought the table with the foreign key should be looked at. Okay, here are both the tables abc and def. Note: I *may* have made a booboo in typing out the definition of abc the first time. (I have to use generic field names to protect the confidentiality of the project.) If so, I apologize for wasting your time. I think it's right this time. You'll note that table def itself has a foreign key reference. I trust that the table it refers to is irrelevant for the sake of this problem. --------------------- the tables ---------------------- create table abc ( c1 serial not null primary key, c2 smallint not null, lab text not null, dlab text not null, bdigits bigint null, foreign key (dlab) references def ); create table def ( defseq serial not null primary key, dlab text unique not null, dset text null, choices text null check (logos in ('','case1','case2', 'case3','case4')), l1 text null, l2 text null, l3 text null, foreign key (dset) references datasets ); ------------------------------------------------------- One person asked about the release. It's 7.1.3. BTW, this is a very small and very short project. Probably no more than a couple dozen records in a total of five tables. But it's an important one. Unfortunately, the clock is about to run out on this problem, and I may have to go with another klugier version to get it in operation. I hate it when that happens. I had a total of two days to go from scratch to becoming an expert in PostgreSQL. Didn't exactly get that far. Thanks again for your help. Sorry if I overlooked anyone who responded. -- Lynn David Newton Phoenix, AZ
В списке pgsql-general по дате отправления: