Thread: Making "invisible" characters visible ? (psql)

Making "invisible" characters visible ? (psql)

From
stan
Date:
I added a column to an existing table, so there should be nothing (actually
the default, I suppose) in this column for all existing rows.

However if I do:

select new_column from modified_table ;

I get the total number of rows in the table, but the lines on the screen
have no visible characters. I was expecting these to be nulls, and this
select to return nothing.

How can i make these "invisible" characters visible?

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                        -- Benjamin Franklin



Re: Making "invisible" characters visible ? (psql)

From
Brian Dunavant
Date:


On Wed, Nov 20, 2019 at 9:16 AM stan <stanb@panix.com> wrote:

How can i make these "invisible" characters visible?



In psql, by default it displays nulls as nothing.  You can specify what they should display as with:

\pset null '<something>'

Chances are those are all nulls, and will now display as whatever you set them to.  If they aren't, let us know.

Re: Making "invisible" characters visible ? (psql)

From
stan
Date:
On Wed, Nov 20, 2019 at 09:22:02AM -0500, Brian Dunavant wrote:
> On Wed, Nov 20, 2019 at 9:16 AM stan <stanb@panix.com> wrote:
> 
> >
> > How can i make these "invisible" characters visible?
> >
> >
> >
> In psql, by default it displays nulls as nothing.  You can specify what
> they should display as with:
> 
> \pset null '<something>'
> 
> Chances are those are all nulls, and will now display as whatever you set
> them to.  If they aren't, let us know.
That worked, and yes they are NULLs, guess I expected to get 0 rows, as the
only column I requested contained ONLY NULL's.

basic misunderstanding on my part, i suppose.

Thank you for your help.

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                        -- Benjamin Franklin



Re: Making "invisible" characters visible ? (psql)

From
Adrian Klaver
Date:
On 11/20/19 7:01 AM, stan wrote:
> On Wed, Nov 20, 2019 at 09:22:02AM -0500, Brian Dunavant wrote:
>> On Wed, Nov 20, 2019 at 9:16 AM stan <stanb@panix.com> wrote:
>>
>>>
>>> How can i make these "invisible" characters visible?
>>>
>>>
>>>
>> In psql, by default it displays nulls as nothing.  You can specify what
>> they should display as with:
>>
>> \pset null '<something>'
>>
>> Chances are those are all nulls, and will now display as whatever you set
>> them to.  If they aren't, let us know.
> That worked, and yes they are NULLs, guess I expected to get 0 rows, as the
> only column I requested contained ONLY NULL's.
> 
> basic misunderstanding on my part, i suppose.

NULL is a value so it should 'show' up.

> 
> Thank you for your help.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com