Re: [GENERAL] libperl.so
There is also a way to recompile a .a library into a shared library. Something like: ar x library.a ld -shared -o library.so *.o It's documented somewhere, a web search on "convert shared library" will probably turn up some detailed documentation. At 11:52 PM 8/4/00, Alex Pilosov wrote: On Fri, 4 Aug 2000, Ron Peterson wrote: I can't compile the perl module because libperl is not a shared library. So what I'd like to do is simply download the 5.6 perl source, compile, and go. I'm using Red Had 6.1, which has the perl-5.00503-6 rpm installed. Of course there are a jillion other packages which depend on this one. So my question is, what happens if I rpm -e perl, then make, make install the latest 5.6 source? Is my whole world going to fall apart? The best idea for you is to install SRPM for 5.005, and then change the configuration to build libperl.so, and manually copy libperl.so to /usr/lib. -alex
Re: [GENERAL] libperl.so
i removed the perl rpm and installed perl 5.6.0 from source on a redhat 6.2 machine without problems. i went through a lot of extra steps to ensure cleanliness, however, which you may or may not be able to do. here's basically what i did: rpm -e mod_perl rpm -qa | grep piranha | xargs rpm -e rpm -qa | grep php | xargs rpm -e rpm -qa | grep apache | xargs rpm -e rpm -qa | grep postgresql | xargs rpm -e rpm -qa | grep ImageMagick | xargs rpm -e rpm -e perl --nodeps rm -rf /usr/lib/perl5/5* rm -rf /usr/lib/perl5/man rm -rf /usr/lib/perl5/site* rm -rf ~/.cpan cd /usr/local/src mkdir -p packages cd packages wget -c ftp://ftp.perl.org/pub/CPAN/src/perl-5.6.0.tar.gz wget -c ftp://ftp.perl.org/pub/CPAN/src/perl-5.6.0.tar.gz cd .. rm -rf perl-5.6.0 tar zxvf packages/perl-5.6.0.tar.gz chown -R root.root perl-5.6.0 cd perl-5.6.0 rm -f config.sh Policy.sh sh Configure -Dcc=gcc -Dprefix=/usr -Dman3dir=/usr/lib/perl5/man/man3 -de make make test make install-strip cd .. sync the rpm spec does a lot of extra stuff when building perl. most of it is to work around perl's installation scheme in order to allow for buildroot and relocatable mechanisms in the rpm. i decided not to deal with that anymore. the method above won't build a perl shared library for you, only a static one. remove the "-de" from that configure line and it will prompt you on all of its questions, one of which is to build a shared library. i'm sure there's a -D flag you can pass it for that too, but i don't know what it is offhand. consult the perl install docs. all the rpm -e commands at the top are because those packages either have things in a "5.005" directory in /usr/lib/perl5, or are packages that depend on a package with files in such a directory. that's not going to fly from a base perl 5.6.0 installation, since it will now use a "5.6.0" directory. i don't understand why perl does that, but that's beside the point. you can probably get away with just removing the "postgresql-perl" package instead of the whole postgresql distribution, but yeah, uh whatever. you'll figure it out. after installing perl i imagine you could rpm --rebuild those packages from their .src.rpm files and then install them and they would use the correct perl paths, or if not i'm sure a couple well-placed symbolic links would help you. i don't really use any of those packages so it doesn't matter to me. stuff like apache i typically prefer to install from source over using an rpm anyway. anyway, to each his own, i just wanted to chime in and say it's doable. good luck. -tcl. On Sat, 5 Aug 2000, Charles Tassell wrote: There is also a way to recompile a .a library into a shared library. Something like: ar x library.a ld -shared -o library.so *.o It's documented somewhere, a web search on "convert shared library" will probably turn up some detailed documentation. At 11:52 PM 8/4/00, Alex Pilosov wrote: On Fri, 4 Aug 2000, Ron Peterson wrote: I can't compile the perl module because libperl is not a shared library. So what I'd like to do is simply download the 5.6 perl source, compile, and go. I'm using Red Had 6.1, which has the perl-5.00503-6 rpm installed. Of course there are a jillion other packages which depend on this one. So my question is, what happens if I rpm -e perl, then make, make install the latest 5.6 source? Is my whole world going to fall apart? The best idea for you is to install SRPM for 5.005, and then change the configuration to build libperl.so, and manually copy libperl.so to /usr/lib. -alex
Re: [GENERAL] libperl.so
Charles Tassell wrote: There is also a way to recompile a .a library into a shared library. Something like: ar x library.a ld -shared -o library.so *.o But a shared lib is _supposed_ to be compiled with position-independent code with -fPIC -- otherwise you are just asking for trouble to simply relink in this way. It may work for you (as it does for me with pl/perl, and for Karl DeBisschop), but it is highly unlikely it will work for everyone, and it is likely to cause performance issues even if it does work. -- Lamar Owen WGCR Internet Radio 1 Peter 4:11
[GENERAL] foreign keys
Could someone explain me some fact about FK handling in postgresql (7.0.2) ? 1. WHen I create table with foreign key to other one ( with ON UPDATE CASCADE), i get two constraints for created table: one for insert one for update. Additionaly there is created constraint (on rows deletion) in referenced table 2. when I pg_dump whole database all of them are saved OK. 3. when I pg_dump just the new table (created) the third constraint is not dumped cause it's "connected" to referenced table. Due to the fact that many ALTER TABLE xxx commands are not implemented this can lead to loss of database "knowledge" during modification of tables structured. Of course manipulation of such loose constraints is extremly uncomfortable; Not to mentions fact that in a few places in docs it's shown as a method for copying table "SELECT... INTO" which does not "take" keys with it leading to database knwoledge loss. Maybe there is something wchich I missed or misunderstanded in FK handling in postgres? Could someone explain me this, please? -- radoslaw.stachowiak.http://alter.pl/
Re: [GENERAL] foreign keys
Not to mentions fact that in a few places in docs it's shown as a method for copying table "SELECT... INTO" which does not "take" keys with it leading to database knwoledge loss. That is a good point. SELECT INTO doesn't support constraints. Unfortunately, I don't really know a way around that. The only solution is CREATE TABLE and then INSERT INTO ... SELECT. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026
Re: [GENERAL] pg_id: command not found
Thank you Tom, Is /usr/lib/pgsql/bin in your PATH? Very easy. I mus have been blind... Maentime I found SuSE Linux supplies a package called pg_data???.rpm which includes the database files. Installing this seams to be the same as running initdb. After I installed the package I found the new database directory in /var/lib/pgsql/ btw. I found somethings seams to be wrong with the and package rpm say nothing needs to be updated or so but there are some files missing from pg_ifa. After reinstalling the files I can run postgres now without problems. C. -- Carsten Huettl - http://www.ahorn-Net.de pgp-key on request
[GENERAL] Table Design: Timestamp vs time/date
I'm currently setting up a table to contain user login/logout information. Just wondered what would be more scalable??better to index,etc... Having a 'timestamp' field 'CCYY-MM-DD HH:MM:SS.SS' or two separate fields one for time 'HH:MM:SS.SS' and one for Date 'CCYY-MM-DD'. most queries will be of the form: select from table where username='xxx' and date'CCYY-MM-DD' and date'CCYY-MM-DD' so I was thinking that a separate 'Date only' field would index better.. Any Thoughts?? -- Dale Walker [EMAIL PROTECTED]