Re: [GENERAL] Help with converting hexadecimal to decimal

2005-03-31 Thread Doug Quale
Bruce Momjian  writes:

> Chandra Sekhar Surapaneni wrote:
> > Hi All,
> >   Is there a built in function which works exactly the opposite way as
> > to_hex(). 
> > I basically want to convert a a hexadecimal to a decimal. 
> 
> Sure:
>   
>   test=> SELECT x'10'::integer;
>int4
>   --
>  16
>   (1 row)

That's not the inverse of to_hex().  to_hex() takes an integer and
returns text.  You've taken the bitstring constant B'1' and
coerced it to integer.  The inverse funtion would take the text '10'
and return the integer 16.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [pgsql-advocacy] [GENERAL] Oracle buys Innobase

2005-10-19 Thread Doug Quale
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:

> On Wed, 19 Oct 2005, [EMAIL PROTECTED] wrote:
>
>> I was referring to trailing blanks, but did not explicitly say it,
>> though showed it in the examples.  I am pretty sure that the SQL
>> standard says that trailing whitespace is insignificant in string
>> comparison.
>
> Then we are broken too :)
>
> # select 'a ' = 'a  ';
>   ?column?
> --
>   f
> (1 row)

# select 'a'::char(8) = 'a '::char(8);
 ?column? 
--
 t
(1 row)

Trailing blanks aren't significant in fixed-length strings, so the
question is whether Postgresql treats comparison of varchars right.

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [pgsql-advocacy] [GENERAL] Oracle buys Innobase

2005-10-20 Thread Doug Quale
"Guy Rouillier" <[EMAIL PROTECTED]> writes:

> Doug Quale wrote:
>> 
>> # select 'a'::char(8) = 'a '::char(8);
>>  ?column?
>> --
>>  t
>> (1 row)
>> 
>> Trailing blanks aren't significant in fixed-length strings, so the
>> question is whether Postgresql treats comparison of varchars right. 
>
> This result is being misinterpreted.   
>
> select length('a'::char(8)) ==> 1
> select length('a '::char(8)) ==> 1
>
> So it isn't that the two different strings are comparing equal.  The
> process of casting them to char(8) is trimming the blanks, so by the
> time they become fixed length strings, they are indeed equal.

Huh??? What version of PG are you using?  On 7.4.9,


test=# select length('a'::char(8));
 length 

  8
(1 row)

test=# select length('a '::char(8));
 length 

  8
(1 row)

The truncation you describe would simply be wrong.

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] PostgreSQL training curriculum

2004-12-21 Thread Doug Quale
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:

> I am being paid for this training, so keep that in mind if you're a real
> GPL zealot. ;)

Why would a GPL zealot care if you are being paid to provide training?

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [GENERAL] About GPL and proprietary software

2003-09-02 Thread Doug Quale
Bruce Momjian <[EMAIL PROTECTED]> writes:

> The FSF would _like_ dynamic linking to pass the GPL to the
> closed-source binary, but that doesn't make it so --- I would like a lot
> of things but wanting it to happen isn't enough.
> 
> Their FAQ says (http://www.gnu.org/licenses/gpl-faq.html):
> 
>   What is the difference between "mere aggregation" and "combining two
>   modules into one program"?
>   
>   Mere aggregation of two programs means putting them side by side on
>   the same CD-ROM or hard disk. We use this term in the case where they
>   are separate programs, not parts of a single program. In this case, if
>   one of the programs is covered by the GPL, it has no effect on the other
>   program.
>   
>   Combining two modules means connecting them together so that they
>   form a single larger program. If either part is covered by the GPL, the
>   whole combination must also be released under the GPL--if you can't, or
>   won't, do that, you may not combine them.
>   
>   What constitutes combining two parts into one program? This is a
>   legal question, which ultimately judges will decide. We believe that a
>   
>   ^^^
>   proper criterion depends both on the mechanism of communication (exec,
>   pipes, rpc, function calls within a shared address space, etc.) and the
>   semantics of the communication (what kinds of information are
>   interchanged). 
> 
> You can bet that RMS, control freak that he is, wouldn't have put that
> disclaimer in there if he felt he had much chance of making the GPL
> dynamic linking restriction enforceable.

Name calling ("control freak") is childish.

If you are not a lawyer and you want to bet that dynamic linking to a
GPL'ed library doesn't invoke the GPL then I think you're taking a
gamble.  Clearly you think you know more about the law than the FSF
General Counsel Eben Moglen (professor of law at Columbia).

Combined works dynamically linked to GPL libraries involve untested
legal issues.  The legal issues are complex, and when law and
technology collide it can be hard to predict the outcome.  RMS
believes the GPL is enforcable in this case, but until someone is
willing to be sued by the FSF over this no one will know for sure.
(None of the GPL violators the FSF has pursued have been willing to
risk a trial so far.)

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] About GPL and proprietary software

2003-09-24 Thread Doug Quale
Bruce Momjian <[EMAIL PROTECTED]> writes:

> The fact is the MySQL and the FSF want to make the GPL reach as far as
> possible, so there is no attempt to make a reasonable definition.  In
> fact, they rely on that fuzzy definition, and the threat of legal action
> (legal extortion) to further the reach of the GPL as far as possible. 
> This is what bothers me the most --- license FUD (sounds like a new
> term).

First, conflating MySQL and the Free Software Foundation is an error.
As far as I know, the FSF hasn't said anything about MySQL's dual
licensing scheme or about MySQL's interpretation of the GPL.  The FSF
is not the copyright holder of the MySQL source code.

Your "legal extortion" claim is completely unfounded.  There are many
large companies (Microsoft and IBM come to mind) who need have no
legal fear of the FSF.  There are better possible explanations why no
one has challenged the GPL in court than the absurd notion that
everyone is terrified by the FSF's irresistible legal might.

License FUD is also a ridiculous notion.  People have had questions
about the GPL (and other licenses), and people will continue to have
questions.  Copyrights and licenses are a complex subject and most of
us are programmers, not lawyers.  If you want to know how the FSF
interprets the GPL in a specific circumstance, ask them.  If the FSF
interpretation of the GPL doesn't give you the rights you want, find
or purchase code under a different license or write it yourself.

Why do you want to try to circumvent the wishes of the copyright
holder of GPL software?  This is a morally bankrupt enterprise.

If you hate the GPL so much, I encourage you to stop using gcc.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])