[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] update without SET ?
From:       Michael Moore <michaeljmoore () gmail ! com>
Date:       2016-02-04 19:19:22
Message-ID: CACpWLjNLEDtgU0tps0s84w3GtvbRb9Mv27LA+5Y3mTM=zajeHQ () mail ! gmail ! com
[Download RAW message or body]

>
> Just re-ran the query I provided on the table​
>
> ​mytest with inserted record you provided above and it worked fine.  Query
> executed using psql.
>
You are correct, no problem using psql, it must have been a pgAdmin III
problem.

> But I have no clue what you mean by: 'att' ? 'attrib' = true; SELECT 'att'
> ? 'attrib' doesn't even execute and ​the existence operator only considers
> exact matches.

I have now leaned what the ? operator does. So, no problem here.

> P.S. List convention is to either inline or bottom-post.

I hope this is correct.

Again, thanks so much, have a great day.

Mike

>


On Thu, Feb 4, 2016 at 8:31 AM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

> On Thu, Feb 4, 2016 at 9:19 AM, Michael Moore <michaeljmoore@gmail.com>
> wrote:
>
>>
>> Also, was just thinking that two columns with names of say: attrib and
>> att would cause a problem if att was NOT in the JSON and attrib was in,
>>  because: 'att' ? 'attrib' = true. I should be able to clean this up if
>> indeed it is a problem at all. Have not tested it yet.
>>
>
> ​Just re-ran the query I provided on the table​
>
> ​mytest with inserted record you provided above and it worked fine.  Query
> executed using psql.
>
> But I have no clue what you mean by: 'att' ? 'attrib' = true; SELECT 'att'
> ? 'attrib' doesn't even execute and ​the existence operator only considers
> exact matches.
>
> ​This will work: if you get more errors you will need to supply the
> complete test case.
>
> David J.
>
> P.S. List convention is to either inline or bottom-post.
> ​
>
>

[Attachment #3 (text/html)]

<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
class="gmail_default" \
style="font-size:12.8px;font-family:arial,helvetica,sans-serif;display:inline">Just \
re-ran the query I provided on the table​</div><span style="font-size:12.8px">  \
</span><div class="gmail_default" \
style="font-size:12.8px;font-family:arial,helvetica,sans-serif;display:inline">​mytest \
with inserted record you provided above and it worked fine.   Query executed using \
psql.</div></blockquote><div>You are correct, no problem using psql, it must have \
been a pgAdmin III problem.</div><blockquote class="gmail_quote" style="margin:0px \
0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span \
style="font-family:arial,helvetica,sans-serif;font-size:12.8px">But I have no clue \
what you mean by: &#39;att&#39; ? &#39;attrib&#39; = true; SELECT &#39;att&#39; ? \
&#39;attrib&#39; doesn&#39;t even execute and ​the existence operator only \
considers exact matches.</span></blockquote><div>I have now leaned what the ? \
operator does. So, no problem here.</div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span \
style="font-family:arial,helvetica,sans-serif;font-size:12.8px">P.S. List convention \
is to either inline or bottom-post.</span></blockquote><div>I hope this is correct.  \
</div><div><br></div><div>Again, thanks so much, have a great \
day.</div><div><br></div><div>Mike  </div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> \
</blockquote></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb \
4, 2016 at 8:31 AM, David G. Johnston <span dir="ltr">&lt;<a \
href="mailto:david.g.johnston@gmail.com" \
target="_blank">david.g.johnston@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><span class=""><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif"><span \
style="font-family:arial,sans-serif">On Thu, Feb 4, 2016 at 9:19 AM, Michael Moore \
</span><span dir="ltr" style="font-family:arial,sans-serif">&lt;<a \
href="mailto:michaeljmoore@gmail.com" \
target="_blank">michaeljmoore@gmail.com</a>&gt;</span><span \
style="font-family:arial,sans-serif"> wrote:</span><br></div></span><div \
class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><br></div></blockquote><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><font color="#0b5394">Also, was just thinking \
that two columns with names of say: attrib and att would cause a problem if att was \
NOT in the JSON and attrib was in,   because: &#39;att&#39; ? &#39;attrib&#39; = \
true. I should be able to clean this up if indeed it is a problem at all. Have not \
tested it yet.</font></div></blockquote><div><br></div></span><div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;display:inline">​Just re-ran the \
query I provided on the table​</div>  <div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;display:inline">​mytest with inserted \
record you provided above and it worked fine.   Query executed using \
psql.</div></div><div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;display:inline"><br></div></div><div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;display:inline">But I have no clue what \
you mean by: &#39;att&#39; ? &#39;attrib&#39; = true; SELECT &#39;att&#39; ? \
&#39;attrib&#39; doesn&#39;t even execute and ​the existence operator only \
considers exact matches.</div></div><div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif;display:inline"><br></div></div><div><div \
class="gmail_default" style="font-family:arial,helvetica,sans-serif">​This will \
work: if you get more errors you will need to supply the complete test \
case.</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif">David J.</div><div \
class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div \
class="gmail_default" style="font-family:arial,helvetica,sans-serif">P.S. List \
convention is to either inline or bottom-post.</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif">​</div><br></div></div></div></div> \
</blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic