[ADMIN] Cyrillic/WIN/mb support question

1999-10-17 Thread Max Pyziur

Greetings all, 

I'm getting my feet wet w/ Postgresql so apologies if I'm being clueless
in front of you more knowledgeable cognescenti.

Background:
I've got a Linux RH5.2 setup at home and have started using a combo of
Apache 1.3.3/Postgres 6.3.x/PHP.  All this RPM-in-the-can stuff is
lovely; works very nicely.

My goal is to develop and use some Ukrainian/English language databases
so naturally seeing recent discussions about the useage of enable-mb and
Cyrillic have gotten me all excited.  My goal is to use cp1251 encoding
with Ukrainian (as an aside, do you folks - Oleg Broytmann and Tatsuo
Ishii know if in fact the CP1251 relevant code supports the unique
Cyrillic letters to Ukrainian, i.e. i, yi, ye, and ge)

To that end I've begun to compile and test version 6.5, first on my
Linux setup, then on my production server (a wheezing old Sparc 75Mhz
running Solaris 2.6).  Basic compilations with no mb support on both
platforms compile, install, and startup.  But ...

When I configure in the following way:
./configure --prefix=/usr/home/postgres2 \
--with-pgport=5432 \
--disable-hba  --enable-locale --with-mb=WIN --with-template=linux_i386

and then do a gmake install I get (what I think) are the following
relevant error messages:

sh  Gen_fmgrtab.sh ../../include/catalog/pg_proc.h
gcc -I../../include -I../../backend   -O2 -Wall -Wmissing-prototypes
-I..-c fmgrtab.c -o fmgrtab.o
ld -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o
fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o misc/SUBSYS.o mmgr/SUBSYS.o
sort/SUBSYS.o time/SUBSYS.o mb/SUBSYS.o
mb/SUBSYS.o: In function `getdatabaseencoding':
mb/SUBSYS.o(.text+0x10a0): multiple definition of `getdatabaseencoding'
init/SUBSYS.o(.text+0x5a0): first defined here
ld: Warning: size of symbol `getdatabaseencoding' changed from 22 to 16
in mb/SUBSYS.o
gmake[2]: *** [SUBSYS.o] Error 1
gmake[2]: Leaving directory
`/usr/home/pyz/projects/postgres/postgresql-6.5.2/src/backend/utils'
gmake[1]: *** [utils.dir] Error 2
gmake[1]: Leaving directory
`/usr/home/pyz/projects/postgres/postgresql-6.5.2/src/backend'
gmake: *** [all] Error 2


Any help in this regard would be greatly appreciated, knowing full well
that all of us had major deadlines two weeks ago which we are still
scrambling to make.

-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/





[ADMIN] writing UPPER()

2000-03-29 Thread Max Pyziur

Greetings, 

I'm trying to write a function similar to "upper" and am trying to
find the source code in the postgresql.6.5.3 tarball.  Could someone
who knows point me in the right direction?

Thanks!


-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/



Re: [ADMIN] Database conversion

2000-04-16 Thread Max Pyziur

Steve Murphy wrote:
> 
> Hi,
> 
> Does anyone know of any conversion programs that will either convert an
> MS Access database file to a Postresql database or from a Filemaker Pro
> database file to a Postresql database for the Red Hat Linux OS?
> 
> Any help or educated guesses of where to start looking would be
> extremely welcome.

Apologies that this reply is coming possibly a bit late.

My experience is essentially limited to Postgres, Informix, and
Foxpro, the last in which I haven't done any development in a while.

General procedure that I know of is:
1 - dump the schema of one to a file and tweak it so that it conforms
to the standards of the target database server
2 - dump the data to a pipe-delimited text file
3 - use the schema from the source database program to create a
database in the target database program/server
4 - import the pipe-delimited data.

In the case of Informix and Postgres, both have utilities (dbschema
and pg_dump with the -s flag, respectively) which allow you to output
a databases schema to stdout or a file.  I know that with Foxpro 3.0
there was some sort of schema utility included somewhere.  Informix
has an SQL command called UNLOAD which allows you to dump data to
pipe-delimited formats; pg_dump -a dumps the data in postgres; COPY in
the postgres monitor gives you a little more control as to the format
of data dump.  Informix's syntax is a cleaner implementation in this
regard, though.  Postgres's pg_dump is great, though, for backing up a
whole database w/ schema and restoring it.

So I only gave you half an answer since I didn't address your MS
Access or Filemaker pro issues.  I suspect though you can do exports
and control the format in some way.
 
> Thanx, Steve.

-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/



Re: [ADMIN] Re: Future plans for raw devices ?

2000-06-02 Thread Max Pyziur

On Fri, 2 Jun 2000, Bruce Momjian wrote:

> > > Most think that raw devices are a pain and offer little performance
> > > improvement and lots of portability and coding problems.
> >
> >  I don't know how much it is a performance improvement (someone say
10-20%),
> > but Bruce is probably right, it is a huge work and with dependence on
> > hardware & system implementation.
> >
> >  We already discussed about it --- it is hacker's archive.
>
> One intresting issue is that commerical databases that recommended raw
> spaces are moving away from them, which helps us to know that the
> raw device benefit must be pretty small.

I beg to differ.  Informix (the system my shop uses) blazes using raw
devices; Oracle (from what I understand) does also.  Sybase (a resource
hog), on the other hand, seems to prefer cooked file systems.

> >
> >  IMHO now is not in PG background for features like I/O raw or on-line
> > replication. It needs better storage layout and tablespace feature.
>
> Vadim is working on storage layout for 7.2, and replication should be
> done after WAL is implemented.
>
> --
>   Bruce Momjian|  http://www.op.net/~candle
>   [EMAIL PROTECTED]   |  (610) 853-3000
>   +  If your life is a hard drive, |  830 Blythe Avenue
>   +  Christ can be your backup.|  Drexel Hill, Pennsylvania
19026
>

Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/





[ADMIN] Localization support

2000-07-29 Thread Max Pyziur


Greetings, 

Someone recently mentioned that the implementation of localization support in
PG7.0.x is different from pre-7.x.x releases.

My interest is in getting Ukrainian collation orders working in one of my
databases.

Any help in this regard would be appreciated greatly.



-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/



Re: [ADMIN] 7.0.2 questions on encoding and compilation

2000-08-30 Thread Max Pyziur



On Wed, 30 Aug 2000, Dana Hudes wrote:

> I have compiled for i686 by hacking up my RPM compile environment.

Exactly, what settings do you use?

MP
 
> On Wed, 30 Aug 2000 [EMAIL PROTECTED] wrote:
> 
> > Currently, I'm using the the 7.0.2 rpms from the postgresql.org
> > on a RH6.2 install.
> > 
> > I have a few questions on it and the use of the -E flag.
> > 
> > 1 - can 7.0.2 be optimized for i686 architecture or is 
> > it only possible to compile for i386 architecture?
> > 
> > 2 - Can createdb -E someencoding be used "straight out of the box"
> > with Postgresql 7.0.2 or does support need to be compiled into 
> > the function?
> > 
> > 3 - What are the list of arguments which can be taken with the 
> > command createdb -E  ?
> > 
> > 
> > 
> > Thanks!
> > 
> > 
> > 
> > 
> > Max Pyziur BRAMA - Gateway Ukraine
> > [EMAIL PROTECTED]  http://www.brama.com/
> > 
> 
> 




Re: [SQL] Re: [ADMIN] 7.0.2 questions on encoding and compilation

2000-09-06 Thread Max Pyziur



On Thu, 31 Aug 2000, Igor N. Avtaev wrote:

> [EMAIL PROTECTED] wrote:
> 
> > Currently, I'm using the the 7.0.2 rpms from the postgresql.org
> > on a RH6.2 install.
> >
> > I have a few questions on it and the use of the -E flag.
> >
> > 1 - can 7.0.2 be optimized for i686 architecture or is
> > it only possible to compile for i386 architecture?
> 
> Yes. Changed C compilation flags in template file for your operating
> system.

Could you please specify which flags are necessary?

Thanks!

 
> >
> > Max Pyziur BRAMA - Gateway Ukraine
> > [EMAIL PROTECTED]  http://www.brama.com/
[recycle]
 




RE: [ADMIN] 7.0.2 questions on encoding and compilation

2000-09-06 Thread Max Pyziur



On Wed, 6 Sep 2000, vijayendra mohan agrawal wrote:

> 2. createdb -E option can be used, but it seems it needs a re-compilation
> which will make "pg_encoding" in your pgsql/bin directory. configure
> with --enable-multibyte option and re-install postgreSQL... it should serve
> the purpose.

What if you just want to use single byte encodings such as
Windows-CP1251?  Which configuration option should you use?
 
> 3. execute "createdb --help" for more details. --encoding=ENCODING should be
> given for creating db with encoding, here "ENCODING" is the type of encoding
> you want...
> 
> Hope this helps...
> 
> Thanks and regards,

Thanks!  and I have read the README.mb file.

> Vijay

Max Pyziur

 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, August 31, 2000 2:33 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [ADMIN] 7.0.2 questions on encoding and compilation
> 
> 
> Currently, I'm using the the 7.0.2 rpms from the postgresql.org
> on a RH6.2 install.
> 
> I have a few questions on it and the use of the -E flag.
> 
> 1 - can 7.0.2 be optimized for i686 architecture or is
> it only possible to compile for i386 architecture?
> 
> 2 - Can createdb -E someencoding be used "straight out of the box"
> with Postgresql 7.0.2 or does support need to be compiled into
> the function?
> 
> 3 - What are the list of arguments which can be taken with the
> command createdb -E  ?
> 
> 
> 
> Thanks!
> 
> 
> 
> 
> Max Pyziur BRAMA - Gateway Ukraine
> [EMAIL PROTECTED]  http://www.brama.com/
> 
> 




[ADMIN] "ORDER BY" issue - is this a bug?

2000-09-10 Thread Max Pyziur

Greetings, 

I've been using postgresql for some time and currently am using it in three
different environments (specific details below) w/ the first two being 6.5.x
releases and the third  7.0.2-2:

I've come across what I consider an odd sorting anomaly in 7.0.2-2 where running
the following query:
select headline from headlines where headline like 'Alb%' order by 1 ;

The results in the 7.0.2-2 install come back case-insensitive and oblivious to
punctuation.  This seems to me to be a bug; case-insensitive ordering can be
achieved with the use of UPPER() or LOWER() functions, otherwise why have the
functions.  Also, I've created three test databases on the 7.0.2-2 system each
with a different specified encoding  - 
 List of databases
  Database  |  Owner   | Encoding  
+--+---
 headlines  | deckard  | WIN
 headlines2 | deckard  | SQL_ASCII
 headlines3 | deckard  | LATIN1

to see if the results are different.  Each of the encodings produces the same
anomalous results.

Any help in this regard as well as resolving it would be appreciated.  Details
of systems and schema are appended below.

-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/


The Details:

On the first two systems the results are as follows:
headline 
-
Albright Arrives in Ukraine to Boost Reforms 
Albright Calls on Ukraine to Announce Chernobyl Closure  
Albright Calls on Ukraine to Speed up Military Reforms   
Albright Hopeful on Chernobyl Cover  
Albright Meets Ukraine Officials 
Albright Reschedules Ukraine Visit   
Albright Throws Weight Behind Ukraine's Kuchma   
Albright To Hold Talks in Ukraine
Albright plans to show support for reform in visit to Ukraine
Albright plans to show support for reform in visit to Ukraine
Albright rushes to kyiv ahead of putin   
Albright says U.S. still backs Kuchma
Albright to perform balancing act in Central Asia
Albright, in Kiev, Hails Russian START-2 Vote
(14 rows)
#

On the 7.0.2-2 system it is:
   headline
---
 Albright Arrives in Ukraine to Boost Reforms 
 Albright Calls on Ukraine to Announce Chernobyl Closure
 Albright Calls on Ukraine to Speed up Military Reforms
 Albright Hopeful on Chernobyl Cover 
 Albright, in Kiev, Hails Russian START-2 Vote
 Albright Meets Ukraine Officials 
 Albright plans to show support for reform in visit to Ukraine
 Albright plans to show support for reform in visit to Ukraine
 Albright Reschedules Ukraine Visit 
 Albright rushes to kyiv ahead of putin
 Albright says U.S. still backs Kuchma
 Albright Throws Weight Behind Ukraine's Kuchma 
 Albright To Hold Talks in Ukraine 
 Albright to perform balancing act in Central Asia
(14 rows)
#



1 - Production - Solaris 2.6 running Postgresql 6.5.2 on a small Sparc 2
compiled from source
2 - Development - RH5.2 Linux 2.0.36 running Postgresql 6.5.3 installed from
rpms
3 - Development - RH6.2 Linux 2.2.14-5.0smp running Postgresql 7.0.2-2 installed
from stock rpms

Database table schema:
headlines=> \d headlines
Table= headlines
+--+--+---+
|  Field   |  Type| Length|
+--+--+---+
| headline_id  | int4 not null default nextval (  | 4 |
| headline | text |   var |
| url  | text |   var |
| postdate | date | 4 |
| source   | text |   var |
| flags| text |   var |
| posttime | timestamp| 4 |
+--+--+---+
Indices:  headlines_headline_id_key
  hl_pdate
      hl_s_pd
  hl_srce



-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/



[ADMIN] Re: [BUGS] "ORDER BY" issue - is this a bug?

2000-09-10 Thread Max Pyziur

Tom Lane wrote:
> 
> Max Pyziur <[EMAIL PROTECTED]> writes:
> > I've come across what I consider an odd sorting anomaly in 7.0.2-2 where running
> > the following query:
> > select headline from headlines where headline like 'Alb%' order by 1 ;
> 
> > The results in the 7.0.2-2 install come back case-insensitive and
> > oblivious to punctuation.
> 
> That's pretty bizarre (not to say difficult to believe).  What LOCALE
> setting are you running the postmaster in?

On none of the installations - the two 6.5.x and the 7.0.2-2 one - I don't have
any locale set.  I get (what I think are) correct results with the first two.

Does 7.0.2-2 require the setting of locale.  If so, where is it documented
and/or how is it done?
 
> regards, tom lane

-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/



[ADMIN] Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug?

2000-09-10 Thread Max Pyziur

Tom Lane wrote:
> 
> Max Pyziur <[EMAIL PROTECTED]> writes:
> >> That's pretty bizarre (not to say difficult to believe).  What LOCALE
> >> setting are you running the postmaster in?
> 
> > On none of the installations - the two 6.5.x and the 7.0.2-2 one - I
> > don't have any locale set.  I get (what I think are) correct results
> > with the first two.
> 
> > Does 7.0.2-2 require the setting of locale.
> 
> AFAIK its behavior should be the same as 6.5 for LOCALE issues.  That's
> why I suspect an environment difference.

Thanks for your quick replies.

I dropped my databases, uninstalled the 7.0.2-2 rpms and installed 6.5.3 rpms on
my development RH6.2 Linux 2.2.14-5.0 system and I still get the anomalous query
result on that box.
 
> I can assure you there is no code in the backend that will do
> case-insensitive, punctuation-insensitive comparisons --- much less any
> to do so without request.  I'm betting that either this is your error,
> or the strcmp() library function is doing it; and as far as I've heard,
> only LOCALE environment variables might affect the behavior of strcmp().

There is a $LANG variable which is set to en_US; is this what might be causing
the problem?  I've tried unsetting it (unset LANG) and still get the problem. 
Is there something else which I should be looking at?
 
> It also seems possible that no sort is happening at all (which would be
> a planner bug), and the ordering you're getting is just whatever happens
> to be in the underlying table.  Does EXPLAIN show that the query is
> being done with an explicit sort?

Running EXPLAIN the results are:
headlines1=> explain select headline from headlines where headline like 'Alb%'
order by 1 ;
NOTICE:  QUERY PLAN:

Sort  (cost=221.15 rows=1 width=12)
  ->  Seq Scan on headlines  (cost=221.15 rows=1 width=12)

EXPLAIN



> regards, tom lane


Thanks again,

Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/



[ADMIN] Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug?

2000-09-11 Thread Max Pyziur



On Mon, 11 Sep 2000, Lamar Owen wrote:

> Max Pyziur wrote:
> > I dropped my databases, uninstalled the 7.0.2-2 rpms and installed 6.5.3 rpms on
> > my development RH6.2 Linux 2.2.14-5.0 system and I still get the anomalous query
> > result on that box.
> 
> This is a RedHat 6.2 locale problem.  Set LC_COLLATE=C and see if that
> fixes things.

That didn't do it.  But I'll tell you what did give me the
(original) results for which I was looking.  Looking through the various
*rc files which get called in the stock RH6.2 installation I saw that
there was a /etc/profile.d/lang.sh file (for bash shells) and lang.csh
(for csh shells).  I moved the lang.sh to lang.sh.bak (since the login
initialization script looks for /etc/profile.d/*sh files), shutdown
postmaster and restarted and now I'm getting the results I got before.

The thing which I'm concerned about is doing a 'env | sort' doesn't show
any of the LC_xxx variable settings.  Nor does 'echo $LC_COLLATE'.  What
command can I use to "expose" these settings to make sure that I don't
run into a similar situation?

Much thanks to you and tom lane (in his ferlinghetti way) for helping me
out of this one (at least to get the original results I had).
 
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11
> 


Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/




[ADMIN] RedHat RPM install errors - advice needed

2001-01-17 Thread Max Pyziur

Greetings,

I installed postgresql-7.0.3-2 from rpms on a new machine.  The
postgresql-server installation gave me the following:

root@www148 /home/deckard/databases> rpm -ivh
postgresql-server-7.0.3-2.i386.rpm
postgresql-server ##
/sbin/ldconfig: warning: can't open var/tmp/rpm-tmp.4657 (Not a directory),skipping
/sbin/ldconfig: warning: can't open 1 (No such file or directory), skipping


I've installed these rpms on other machines of similar configurations (two
dual p3's, 512MB RAM, RH6.2).

The server starts up properly, however, I'm concerned that these error
messages nevertheless need to be rectified.

Thanks in advance.


Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/




Re: [ADMIN] RedHat RPM install errors - advice needed

2001-01-28 Thread Max Pyziur

Lamar Owen wrote:
> 
> Max Pyziur wrote:
> > postgresql-server ##
> > /sbin/ldconfig: warning: can't open var/tmp/rpm-tmp.4657 (Not a directory),skipping
> > /sbin/ldconfig: warning: can't open 1 (No such file or directory), skipping
> 
> > The server starts up properly, however, I'm concerned that these error
> > messages nevertheless need to be rectified.
> 
> Corrected in the 7.1beta RPMs already, but thanks for the report.

Is there something to be concerned about and what do these messages indicate?

> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11

-- 
Max Pyziur BRAMA - Gateway Ukraine
[EMAIL PROTECTED]  http://www.brama.com/