shopsuite-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Shopsuite-dev] rational numbers plugin to pg


From: Tomasz Wegrzanowski
Subject: Re: [Shopsuite-dev] rational numbers plugin to pg
Date: Mon, 6 Aug 2001 18:47:40 +0200
User-agent: Mutt/1.3.20i

On Mon, Aug 06, 2001 at 12:50:27PM +0100, Davi Leal wrote:
> > I will check this plug-in today. I will think about how modify the
> > shop.psql script (later the ShopDB class). I will send to this list a
> > proposal so as to get your opinion.
> 
> 
> See the shop.psql attachment. When I try:
> 
> $ dropdb shop
> $ createdb shop
> 
> # su postgres
> $ psql shop < _RatePlugin_/rational.sql
> (I use the last rational.so version)
> 
> address@hidden:~$ psql shop <  shopsuite/scripts/shop.psql
> All right!. And it works. See below:
> 
> shop=> INSERT INTO products VALUES ('shortdsc', 'longdsc', 12345678.1234,
> '1345/235', 'bottle', TRUE);
> INSERT 61129 1
> shop=> select * from products;
>   shortdsc   | longdsc |  sellprice  |  stock   |         unit         |
> active | prodid
> -------------+---------+-------------+----------+----------------------+--------+--------
> 
>  shortdsc    | longdsc | 12345678.12 | 1345/235 | bottle               |
> t      |      1
> (1 row)
> 
> 
> 
> However, without rebutting the machine I do now:
> 
> $ dropdb shop
> DROP DATABASE
> $
> $ createdb shop
> CREATE DATABASE
> $
> $ psql shop <  shopsuite/scripts/shop.psql
> ERROR:  Unable to locate type name 'rational' in catalog
> [...]
> 
> It seems that the rational type load only works while the session where it was
> loaded is open. What do you think about it?.

New types are created per-database, you must:
davi$ createdb shop
davi$ su
root# su postgres
postgres$ psql shop <  rational.psql
postgres$ exit
root# exit
davi$ psql shop < shop.psql

> Platform: Debian GNU/Linux 'woody' updated today.
> 
> 
> P.S.: What do you think about the new shop.psql script?. Is it right?. Are we
> ready to carry out the ShopDB class changes?.

It looks ok.

The problem is that I don't like the fact that rational plugin needs
special priviledges. I'll investigate if it can be fixed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]