robert mckennon | 6 Jul 2011 00:00
Picon

postgresql return code

I'm trying to determine if a user is in the database...If they are
not, then I want to add them.

in DB2, the return code is different when a "SELECT" statement returns
a value, or if the result is empty, or if the query failed etc..

But in postgresql, it seems that the return code is 0 if the "SELECT"
statement returns an entry or not, just as long as it doesn't fail.

<code snippet>
  # is the user_id in the Database?
  psql xxxx -U postgres -c"select * from users where USER_ID = '$user_id';"
  result=$?
  echo "result from select is:  $result"

  # if the user is NOT in the Database, then add them.
  if [ $result = "1" ] ; then
    psql xxxx -U postgres -c"insert into users (last_name, first_name,
user_id, email_adx) values ('$last_name', '$first_name', '$user_id',
'$email_adx');"
  fi
</code snippet>

So when I run the script...(which parses a list of users, and checks
the postgres db), the return code is always 0.

[rmckenno <at> CentOS_x64 ~]$ ./pg_update.sh
 user_id  | last_name | first_name |        email_adx
----------+-----------+------------+--------------------------
 rmckenno | mckennon  | robert     | robert.mckennon@...
(Continue reading)

William L. Thomson Jr. | 6 Jul 2011 00:50
Favicon

Re: postgresql return code

On Tue, 2011-07-05 at 18:00 -0400, robert mckennon wrote:
> I'm trying to determine if a user is in the database...If they are
> not, then I want to add them.

Seeming simple task, always has to have some complications :)

> in DB2, the return code is different when a "SELECT" statement returns
> a value, or if the result is empty, or if the query failed etc..

Thats quite nice of them, but really only one code to return status, and
a bunch to represent failure. Technically if a sql statement returns
nothing, it still was a successful command. I am not sure I would agree
if it returns non 0 for a empty result. But thats quite moot, I am not
seeking to change DB2 output codes. Likely already been some debates or
such there.

> But in postgresql, it seems that the return code is 0 if the "SELECT"
> statement returns an entry or not, just as long as it doesn't fail.

That would be correct behavior, and their exit codes are documented. 
http://www.postgresql.org/docs/9.1/static/app-psql.html#AEN80350

> <code snippet>
>   # is the user_id in the Database?
>   psql xxxx -U postgres -c"select * from users where USER_ID = '$user_id';"
>   result=$?
>   echo "result from select is:  $result"
> 
>   # if the user is NOT in the Database, then add them.
>   if [ $result = "1" ] ; then
(Continue reading)

Mike Rathburn | 12 Jul 2011 23:48
Favicon

Facebook

Call me crazy, but shouldn't we have a Facebook presence?  There are bunches
of LUG's all over the world with Facebook profiles, so obviously it's not a
bad or novel idea.

I was reading an article, and I thought it would be a good article to share
with the group, but my now instinctual method of 'liking' or sharing it
wasn't available.  So, I created a Facebook account for JaxLug.  Like it and
follow it, or not.  Doesn't matter.  I like the mailing list and will
continue to use it as long as it's available, but c'mon people.  Social
Networking is not a fad, and JaxLug is, in its essence, a social network.

Once we get 25 folks to 'Like' it, then we can start assigning other Admins
to the profile.

---------------------------------------------------------------------
Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed     http://www.mail-archive.com/list-QVYiWngmsdMdnm+yROfE0A <at> public.gmane.org/maillist.xml
Unsubscribe  list-unsubscribe@...

William L. Thomson Jr. | 13 Jul 2011 00:55
Favicon

Re: Facebook

On Tue, 2011-07-12 at 17:48 -0400, Mike Rathburn wrote:
> Call me crazy, but shouldn't we have a Facebook presence?

Someone already created one
http://www.facebook.com/pages/JaxLUG/50122728004

> There are bunches of LUG's all over the world with Facebook profiles,
> so obviously it's not a bad or novel idea.

Also millions of users and businesses, though still many that have not,
and may never.

> I was reading an article, and I thought it would be a good article to share
> with the group, but my now instinctual method of 'liking' or sharing it
> wasn't available.  So, I created a Facebook account for JaxLug.

You created another? Good to be proactive, but googling or posting to
the list would reveal one existed already :)

> Like it and follow it, or not.  Doesn't matter.  I like the mailing list and will
> continue to use it as long as it's available, but c'mon people.  Social
> Networking is not a fad, and JaxLug is, in its essence, a social network.

Its not been around long enough to not be considered a necessity. Many
things we thing are not fads end up being just that. Myspace is an
example, which Google hopes to repeat with Google+. Even things like
Linked in are great. But Silicon Valley and most companies,
technologies, etc we depend on was created long before these things
existed.

(Continue reading)

Mark Price | 13 Jul 2011 01:07
Picon

Re: Facebook

If the LUG is hip it will go to google+.

On Tue, Jul 12, 2011 at 6:55 PM, William L. Thomson Jr. <
wlt@...> wrote:

> On Tue, 2011-07-12 at 17:48 -0400, Mike Rathburn wrote:
> > Call me crazy, but shouldn't we have a Facebook presence?
>
> Someone already created one
> http://www.facebook.com/pages/JaxLUG/50122728004
>
> > There are bunches of LUG's all over the world with Facebook profiles,
> > so obviously it's not a bad or novel idea.
>
> Also millions of users and businesses, though still many that have not,
> and may never.
>
> > I was reading an article, and I thought it would be a good article to
> share
> > with the group, but my now instinctual method of 'liking' or sharing it
> > wasn't available.  So, I created a Facebook account for JaxLug.
>
> You created another? Good to be proactive, but googling or posting to
> the list would reveal one existed already :)
>
> > Like it and follow it, or not.  Doesn't matter.  I like the mailing list
> and will
> > continue to use it as long as it's available, but c'mon people.  Social
> > Networking is not a fad, and JaxLug is, in its essence, a social network.
>
(Continue reading)

William L. Thomson Jr. | 13 Jul 2011 01:18
Favicon

Re: Facebook

On Tue, 2011-07-12 at 19:07 -0400, Mark Price wrote:
> If the LUG is hip it will go to google+.

The LUG is not hip, though probably should be. :)

But really more a matter of if the LUG is exclusive enough. Given no ETA
on when Google will open the doors to Google+. Till then seems invite
only. Which is how Facebook became what it is despite existence of
others, exclusivity. Though as Facebook has opened the door to both
people, entities, and more, far beyond the exclusivity they once had.
Not sure how long that strategy will work. Google is walking a fine line
with Google+. Even Apple doesn't employ strategies like that for the
most part, its all or nothing, like the iCloud.

The ibuzz thus far is Google+ will do to Facebook what Facebook did to
Myspace. Till something else comes along, and trends and times change
again :)

--

-- 
William L. Thomson Jr.
Obsidian-Studios, Inc.
http://www.obsidian-studios.com

---------------------------------------------------------------------
Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed     http://www.mail-archive.com/list-QVYiWngmsdMdnm+yROfE0A <at> public.gmane.org/maillist.xml
Unsubscribe  list-unsubscribe@...

Mike Rathburn | 13 Jul 2011 01:48
Favicon

RE: Facebook

> -----Original Message-----
> From: William L. Thomson Jr. [mailto:wlt@...]
> Sent: Tuesday, July 12, 2011 6:55 PM
> To: Jax-LUG
> Subject: Re: Facebook
> 
> Someone already created one
> http://www.facebook.com/pages/JaxLUG/50122728004
> 
> You created another? Good to be proactive, but googling or posting to the list
> would reveal one existed already :)
> 

That's good to know.  I did do a search on Facebook for Jacksonville Linux Users Group and variants thereof. 
No hits.  Naming the Facebook account "JaxLUG" does no one any good unless you're specifically looking for
"JaxLUG".  The name should have "Linux User's Group" in it in some fashion.  Searching Google as you so
patronizingly suggest nets the Facebook link being found near the bottom of the second page.  Hardly efficient.

I also searched, guess what?, the JaxLUG mailing list.  No mention of anyone creating a Facebook profile.

I'll see if the Admin on the other account can update the name from the cryptic "JaxLUG" to something
findable and meaningful, and if he/she does, I'll delete this new account.  William, as the acting
President you need to push hard for account info.  If you get resistance, then we can use this new account as
the "official" Jacksonville Linux User's Group representation on Facebook.

---------------------------------------------------------------------
Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed     http://www.mail-archive.com/list-QVYiWngmsdMdnm+yROfE0A <at> public.gmane.org/maillist.xml
Unsubscribe  list-unsubscribe@...

(Continue reading)

William L. Thomson Jr. | 13 Jul 2011 02:02
Favicon

RE: Facebook

On Tue, 2011-07-12 at 19:48 -0400, Mike Rathburn wrote:
>
> That's good to know.  I did do a search on Facebook for Jacksonville
> Linux Users Group and variants thereof.  No hits.

Their search sucks, since those keywords do exist on the info page.
Which clearly they do not search with their own search :)

>   Naming the Facebook account "JaxLUG" does no one any good unless
> you're specifically looking for "JaxLUG".  The name should have "Linux
> User's Group" in it in some fashion.

I have no idea who did this, and I had no involvement in it. However its
the same as the domain name, and most anyone calls it JaxLUG. I haven't
heard anyone actually say Jacksonville Linux Users Group is some time,
or even typed it. Though it is still a common search according to
analytics.

>  Searching Google as you so patronizingly suggest nets the Facebook
> link being found near the bottom of the second page.  Hardly
> efficient.

Didn't mean to patronize, I just google everything including myself.
Love how something so innocent can sound so dirty. Though kinda shocking
at times how even when I am inactive. My search count goes up when
searching for my name in quotes.

Also shows how Google tailors results to the IP and keywords. Even more
so if you log in and they really track your history. But for me it shows
as first few links when I type in facebook jaxlug.
(Continue reading)

William L. Thomson Jr. | 13 Jul 2011 02:09
Favicon

RE: Facebook

On Tue, 2011-07-12 at 19:48 -0400, Mike Rathburn wrote:
>
> I also searched, guess what?, the JaxLUG mailing list.  No mention of
> anyone creating a Facebook profile.

FYI when a few of us LUGers were socializing in the #jaxlug irc channel
on freenode.net, the JaxLUG's Facebook page did come up as a topic.
Using an old tried and trued social medium. Though no bots logging
activity in there, so no archive.

Maybe a JaxLUG members should make a bot for the JaxLUG IRC channel to
log to the Wiki or else where. Then again that only helps if people show
there. ;)

--

-- 
William L. Thomson Jr.
Obsidian-Studios, Inc.
http://www.obsidian-studios.com

---------------------------------------------------------------------
Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed     http://www.mail-archive.com/list-QVYiWngmsdMdnm+yROfE0A <at> public.gmane.org/maillist.xml
Unsubscribe  list-unsubscribe@...

William L. Thomson Jr. | 13 Jul 2011 02:13

Who created the JaxLUG Facebook page

TSIA, but for those that think we are looking for Waldo, he has been
found. Its time to find out who created the JaxLUG Facebook page. Please
stand up now, thank you :)

--

-- 
William L. Thomson Jr.
Systems Administrator
Jacksonville Linux Users Group

---------------------------------------------------------------------
Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed     http://www.mail-archive.com/list-QVYiWngmsdMdnm+yROfE0A <at> public.gmane.org/maillist.xml
Unsubscribe  list-unsubscribe@...


Gmane