pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Clift <aa2@bigpond.net.au>
To: pgsql-sql@postgresql.org
Subject: Bad (null) varchar() external representation
Date: Thu, 11 Jan 2001 05:12:10 +1100
Message-ID: <3A5CA5FA.CBDF0513@bigpond.net.au> (raw)

Hi all,

I'm getting the following problem when trying to do a simple insert
statement...

"Bad (null) varchar() external representation"

WHY?

I'm running PostgreSQL 7.03 on Linux Mandrake 7.2 (using a specially
compiled version, not an RPM).

Here's the table :

foobar=# \d staff_details
          Table "staff_details"
   Attribute    |     Type     | Modifier
----------------+--------------+----------
 userid         | varchar(24)  | not null
 password       | char(13)     |
 name           | varchar(96)  |
 role           | smallint     |
 dob            | date         |
 phone_one      | varchar(14)  |
 phone_two      | varchar(14)  |
 phone_three    | varchar(14)  |
 address        | varchar(280) |
 status         | smallint     |
 managers_notes | varchar(600) |
Index: staff_details_pkey
Constraints: (length(userid) < 25)
             (length("password") < 14)
             (length(name) < 97)
             (length(phone_one) < 17)
             (length(phone_two) < 17)
             (length(phone_three) < 17)
             (length(address) < 281)
             (length(managers_notes) < 601)

foobar=# insert into staff_details values ('A', NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL);
ERROR:  Bad (null) varchar() external representation
foobar=# insert into staff_details (userid, password, name, role, dob,
phone_one) values ('0000111122223333', 'foobarbaz1234', 'Joshua', 1,
'1970-07-01', '(03) 9867 5432');
ERROR:  Bad (null) varchar() external representation
foobar=# insert into staff_details values ('0000111122223333',
encrypt('foo'), 'Joshua', 1, '1970-07-01', '(03) 9867 5432', '(041) 309
2819', NULL, '1 Blankety-Blank Way\nBazzville', NULL, NULL);
ERROR:  Bad (null) varchar() external representation


etc...

I've tried everything I can think of, also exported and reloaded the
database, etc.  This is a new table with nothing in it.

This is driving me nuts.  :-(

+ Justin Clift
Database Administrator



view thread (2+ messages)  latest in thread

Message-ID: <3A5CA5FA.CBDF0513@bigpond.net.au>
Permalink:  ../3A5CA5FA.CBDF0513@bigpond.net.au/
Also on:    postgresql.org/message-id/3A5CA5FA.CBDF0513@bigpond.net.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: aa2@bigpond.net.au
  Subject: Re: Bad (null) varchar() external representation
  In-Reply-To: <3A5CA5FA.CBDF0513@bigpond.net.au>
  References: <3A5CA5FA.CBDF0513@bigpond.net.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox