Обсуждение: netmask

Поиск
Список
Период
Сортировка

netmask

От
Oleg Sharoiko
Дата:
Hello!

I think this is a bug. But it's said not to report any bugs unless you're
sure that it's a bug, so I'm asking heer is this a bug?

template1=> select netmask('10.0.0.1/0');
        netmask
---------------
255.255.255.255
(1 row)

This happens because
word << shift
uses only 5 low bits of shift (this is described in docs on Intel processor).
Running
word << 32
on sparc also gives unchanegd word

I've included a patch for 6.5.
I think it will work with 6.5.1

--
Oleg.

Вложения

Re: [GENERAL] netmask

От
Bruce Momjian
Дата:
As I mentioned I already applied it.

> Hello!
>
> I think this is a bug. But it's said not to report any bugs unless you're
> sure that it's a bug, so I'm asking heer is this a bug?
>
> template1=> select netmask('10.0.0.1/0');
>         netmask
> ---------------
> 255.255.255.255
> (1 row)
>
> This happens because
> word << shift
> uses only 5 low bits of shift (this is described in docs on Intel processor).
> Running
> word << 32
> on sparc also gives unchanegd word
>
> I've included a patch for 6.5.
> I think it will work with 6.5.1
>
> --
> Oleg.
Content-Description:

[Attachment, skipping...]


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Is there some type of Daemon that can look at pgsql?

От
"Shawn Pursley"
Дата:
I'm trying to create a program that would look, at a specified interval of
every 15 seconds, at a database;  if there is a new entry(which would be
specified as a field called IMSTAT), it would need to start a process of
copying a .tif file from a local drive and then create a dynamic HTML page
from this .tif.  My end users would be passed an URL of this newly created
page.

After completing the dynamic page, then I would modify the db records to a
completed status and then the system would again check to see if any new
entries existed.

Is pgsql the way that you folks would do this or is there a better way/some
existing daemon that can monitor pgsql?

We currently run Apache 1.3.6
Postgres 6.4.2 (I know this needs to be upgraded)
on a Mandrake 5.2 box (essentially RH 6.0)

Thanks for any and all help,
Shawn


Re: [GENERAL] Is there some type of Daemon that can look at pgsql?

От
Adriaan Joubert
Дата:
Shawn Pursley wrote:
>
> I'm trying to create a program that would look, at a specified interval of
> every 15 seconds, at a database;  if there is a new entry(which would be
> specified as a field called IMSTAT), it would need to start a process of
> copying a .tif file from a local drive and then create a dynamic HTML page
> from this .tif.  My end users would be passed an URL of this newly created
> page.
>
> After completing the dynamic page, then I would modify the db records to a
> completed status and then the system would again check to see if any new
> entries existed.
>
> Is pgsql the way that you folks would do this or is there a better way/some
> existing daemon that can monitor pgsql?

Do it with perl and use DBI/DBD-Pg or the perl interface that comes with
postgres to talk to the database. That is almost certainly the easiest
way, and you can either launch it from cron (perhaps not the right thing
for something that has got to run every 15 seconds), or turn it into a
daemon with some of the modules in CPAN. If I remember correctly the
Perl cookbook shows how to do most of the bits and pieces you'll need.

Adriaan

Re: [GENERAL] Is there some type of Daemon that can look at pgsql?

От
"Sean W. Ellis"
Дата:
Shawn Pursley wrote:
>
> I'm trying to create a program that would look, at a specified interval of
> every 15 seconds, at a database;  if there is a new entry(which would be
> specified as a field called IMSTAT), it would need to start a process of
> copying a .tif file from a local drive and then create a dynamic HTML page
> from this .tif.  My end users would be passed an URL of this newly created
> page.
>
> After completing the dynamic page, then I would modify the db records to a
> completed status and then the system would again check to see if any new
> entries existed.
>
> Is pgsql the way that you folks would do this or is there a better way/some
> existing daemon that can monitor pgsql?
>
> We currently run Apache 1.3.6
> Postgres 6.4.2 (I know this needs to be upgraded)
> on a Mandrake 5.2 box (essentially RH 6.0)
>
> Thanks for any and all help,
> Shawn
>
> ************

in crontab have:

*/15 * * * * /usr/local/sbin/runme 1> /dev/null 2> /dev/null

runme can just be a perl script that connects, checks a value, performs
a copy if needed.  I do this all the time for automating stuff.  I have
stuff that runs every minute instead of 15, but the principal is the
same.  If you need the perl code as an example, please let me know.


--
Sean W. Ellis, ASE/CNE 6586538
Office Systems Center, 110 N. Main, Victoria, TX 77901
UNIX: Because reboots are for hardware upgrades...