Re: Enpty field, grid editor, NOT NULL

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Vladimir Kokovic <vladimir(dot)kokovic(at)gmail(dot)com>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Enpty field, grid editor, NOT NULL
Date: 2011-02-12 14:30:47
Message-ID: AANLkTimqvDsTVVcG+WN0TS7vQxVFkN-KYuJpRb9eHZ_h@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Sat, Feb 12, 2011 at 9:50 AM, Vladimir Kokovic
<vladimir(dot)kokovic(at)gmail(dot)com> wrote:
> Hi,
>
> pgAdmin GIT version.
>
> If I try to empty a varchar NOT NULL field(grid editor) and then leave
> the row, error message box appear:
>
> An error has occurred:
> ERROR:  null value in column "slike" violates not-null constraint

Yes. Per the docs:

If an SQL NULL is to be written to the table, simply leave the field
empty. If you store a new row, this will let the server fill in the
default value for that column. If you store a change to an existing
row, the value NULL will explicitly be written.

To enter a newline into a field, press Ctrl-Enter.

If you want pgAdmin III to write an empty string to the table, you
enter the special string '' (two single quotes) in the field. If you
want to write a string containing solely two single quotes to the
table, you need to escape these quotes, by typing \'\'

See http://www.pgadmin.org/docs/1.12/editgrid.html

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Peter Geoghegan 2011-02-12 14:59:05 Re: possible memory leak in Server Status window
Previous Message Dave Page 2011-02-12 14:22:38 Re: possible memory leak in Server Status window