Thread: RPM package question
We've got an application to install on PostgreSQL 8.2 and the requirements say "Please make sure that PL/pgsql and FuzzyStringMatch library is installed." Can anyone tell me which RPM packages contain these? I have installed: rpm -ivh postgresql-libs-8.2.12-1PGDG.rhel4.i386.rpm rpm -ivh postgresql-contrib-8.2.12-1PGDG.rhel4.i386.rpm rpm -ivh postgresql-8.2.12-1PGDG.rhel4.i386.rpm rpm -ivh postgresql-contrib-8.2.12-1PGDG.rhel4.i386.rpm rpm -ivh postgresql-server-8.2.12-1PGDG.rhel4.i386.rpm I'd appreciate any advice. Thanks
John Gardner <john.gardner@tagish.co.uk> writes: > We've got an application to install on PostgreSQL 8.2 and the > requirements say "Please make sure that PL/pgsql and FuzzyStringMatch > library is installed." > Can anyone tell me which RPM packages contain these? Hmm, I'm pretty sure Devrim's packages split up the same way mine do, so the answer should be -server and -contrib respectively. Which you've got. You probably just haven't activated them in your current database. To install plpgsql you say "CREATE LANGUAGE plpgsql". To install a contrib module you run its defining SQL script, which if memory serves is under /usr/share/pgsql/contrib/ (if not, rpm -ql on the -contrib RPM will tell you where they are). regards, tom lane
Thanks for this Tom. ----- "Tom Lane" <tgl@sss.pgh.pa.us> wrote: > John Gardner <john.gardner@tagish.co.uk> writes: > > We've got an application to install on PostgreSQL 8.2 and the > > requirements say "Please make sure that PL/pgsql and > FuzzyStringMatch > > library is installed." > > > Can anyone tell me which RPM packages contain these? > > Hmm, I'm pretty sure Devrim's packages split up the same way mine do, > so the answer should be -server and -contrib respectively. Which > you've got. You probably just haven't activated them in your current > database. To install plpgsql you say "CREATE LANGUAGE plpgsql". > To install a contrib module you run its defining SQL script, which if > memory serves is under /usr/share/pgsql/contrib/ (if not, rpm -ql > on the -contrib RPM will tell you where they are). > > regards, tom lane
I'm porting a couple of databases over from SQL Server to Oracle. This question isn't so much about the plsql syntax it's about the way PostgreSQL runs scripts and stops every time it occurs an error. For instance, when I run a script in SQL Server, and it comes across a problem e.g. It tries to drop a table that doesn't exist, it will notify me of the error, and then continue on. With PostgreSQL (or at least running scripts in pgAdmin III) the script runs, comes across the error and then rolls back to before the script was run. I know why it does that, so your system is always in a clean state upon an error, but can you change the behaviour so that when comes across an error it notifies me and then continues instead of stopping? We're running 8.2 by the way. Thanks in advance. John
On Jul 9, 2009, at 6:26 AM, John Gardner wrote: > I'm porting a couple of databases over from SQL Server to Oracle. > This > question isn't so much about the plsql syntax it's about the way > PostgreSQL runs scripts and stops every time it occurs an error. > > For instance, when I run a script in SQL Server, and it comes across a > problem e.g. It tries to drop a table that doesn't exist, it will > notify > me of the error, and then continue on. With PostgreSQL (or at least > running scripts in pgAdmin III) the script runs, comes across the > error > and then rolls back to before the script was run. > > I know why it does that, so your system is always in a clean state > upon > an error, but can you change the behaviour so that when comes across > an > error it notifies me and then continues instead of stopping? > > We're running 8.2 by the way. If you run your script with psql instead of pgAdmin III, the default is to not stop. If you want your script to stop on errors with psql, you can put this at the top of the script: \set ON_ERROR_STOP 1 John DeSoi, Ph.D.
John Gardner <john.gardner@tagish.co.uk> writes: > For instance, when I run a script in SQL Server, and it comes across a > problem e.g. It tries to drop a table that doesn't exist, it will notify > me of the error, and then continue on. With PostgreSQL (or at least > running scripts in pgAdmin III) the script runs, comes across the error > and then rolls back to before the script was run. It sounds like you're running the script as a single transaction (ie, inside a begin/commit block). Don't do that if you don't want rollback. I don't know pgAdmin well enough to know how to adjust its behavior for running scripts, but there's probably a knob someplace. Or use plain psql. regards, tom lane
I am having some issues trying to setup security for my development platform. My server is running Windows 2008 Standard Server. I've installed PostGres on this machine. Before installing, I had created a postgres user in active directory with permissions of a standard user. I have two workstations, one is Windows Vista 64 bit (also used as my VM host) and my main development machine is a Windows Vista 32 bit VM running on VMWare 6.5. The IP address range is 192.168.1.25 to 192.168.1.255. Here are the pertinate parts from the pg_hba file. Without the local being available the service will not start. It is my understanding that if I'm going to connect using TCPIP that the localhost should not be used. For now I'm using trust just to see if I can get it to start. When we actually deploy we will be using LDAP services. If I have localhost activated only then I can start the db and open up pgadmin and connect just fine. If it is commented out the db service will not start. I'm needing to set this up so any of my 5 machines can access the db. Running 8.4 Best Regards Michael Gould # Put your actual configuration here # ---------------------------------- # # If you want to allow non-local connections, you need to add more # "host" records. In that case you will also need to make PostgreSQL listen # on a non-local interface via the listen_addresses configuration parameter, # or via the -i or -h command line switches. # # TYPE DATABASE USER CIDR-ADDRESS METHOD # IPv4 local connections: #host all all 127.0.0.1/32 host all all 192.168.1.0/32 255.255.255.0 trust # IPv6 local connections: host all all ::1/128 md5 -- Michael Gould, Managing Partner Intermodal Software Solutions, LLC 904.226.0978 904.592.5250 fax
Below are the errors that are being created on the Database server when I try to start the db. Is it possible that the error is occuring because the postgres userid is in Active Directory as a regular user and it has a password set? I don't want to have to give a password everytime I try and start the service. This is under the System in the Windows Logs The PostgreSQL Server 8.4 service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. Event Error: 7000/7009 This is the message under the Application Windows Log Faulting application pg_ctl.exe, version 8.4.0.9177, time stamp 0x4a468e1d, faulting module libintl-8.dll, version 6.0.6001.18000, time stamp 0x4791a783, exception code 0xc0000135, fault offset 0x0006ecfb, process id 0x1364, application start time 0x01ca00ae9b30082a. Source: Application Error Event ID: 1000 Level: Error User: N/A Looged 7/9/2009 12:02:06PM Task Category (100) Keywords: Classic Computer IssDevServer.issdev.local "Michael Gould" <mgould@intermodalsoftwaresolutions.net> wrote: > I am having some issues trying to setup security for my development > platform. My server is running Windows 2008 Standard Server. I've > installed PostGres on this machine. Before installing, I had created a > postgres user in active directory with permissions of a standard user. > > I have two workstations, one is Windows Vista 64 bit (also used as my VM > host) and my main development machine is a Windows Vista 32 bit VM running > on VMWare 6.5. The IP address range is 192.168.1.25 to 192.168.1.255. > > Here are the pertinate parts from the pg_hba file. Without the local being > available the service will not start. It is my understanding that if I'm > going to connect using TCPIP that the localhost should not be used. For now > I'm using trust just to see if I can get it to start. When we actually > deploy we will be using LDAP services. If I have localhost activated only > then I can start the db and open up pgadmin and connect just fine. If it is > commented out the db service will not start. I'm needing to set this up so > any of my 5 machines can access the db. Running 8.4 > > Best Regards > > Michael Gould > > # Put your actual configuration here > # ---------------------------------- > # > # If you want to allow non-local connections, you need to add more > # "host" records. In that case you will also need to make PostgreSQL listen > # on a non-local interface via the listen_addresses configuration parameter, > # or via the -i or -h command line switches. > # > > > > # TYPE DATABASE USER CIDR-ADDRESS METHOD > > # IPv4 local connections: > #host all all 127.0.0.1/32 > host all all 192.168.1.0/32 255.255.255.0 trust > # IPv6 local connections: > host all all ::1/128 md5 > > > -- > Michael Gould, Managing Partner > Intermodal Software Solutions, LLC > 904.226.0978 > 904.592.5250 fax > > > > -- > Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-novice > -- Michael Gould, Managing Partner Intermodal Software Solutions, LLC 904.226.0978 904.592.5250 fax
I'm no expert, but I believe the format of your pg_hba.conf is wrong. >> >> # TYPE DATABASE USER CIDR-ADDRESS METHOD >> >> # IPv4 local connections: >> #host all all 127.0.0.1/32 >> host all all 192.168.1.0/32 255.255.255.0 trust >> # IPv6 local connections: >> host all all ::1/128 md5 >> The error is this host all all 192.168.1.0/32 255.255.255.0 trust I think you want 192.168.1.0/24 OR 192.168.1.0 255.255.255.0 I don't know if specifying both would work. Also /32 means that all four groups of numbers must match, so you can only connect from the exact IP address 192.168.1.0. /8 means you can connect from 192.anything /16 means 192.168.anything /24 means 192.168.1.anything /32 means 192.168.1.0 exact match -Mike Swierczek
Hi Michael, You are correct in you assesment regarding x.x.x.x/32 http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing Best regards, Saul Michael Swierczek wrote: > I'm no expert, but I believe the format of your pg_hba.conf is wrong. > > >>> # TYPE DATABASE USER CIDR-ADDRESS METHOD >>> >>> # IPv4 local connections: >>> #host all all 127.0.0.1/32 >>> host all all 192.168.1.0/32 255.255.255.0 trust >>> # IPv6 local connections: >>> host all all ::1/128 md5 >>> >>> > The error is this > host all all 192.168.1.0/32 255.255.255.0 trust > > I think you want > 192.168.1.0/24 OR > 192.168.1.0 255.255.255.0 > > I don't know if specifying both would work. > Also /32 means that all four groups of numbers must match, so you can > only connect from the exact IP address 192.168.1.0. > /8 means you can connect from 192.anything > /16 means 192.168.anything > /24 means 192.168.1.anything > /32 means 192.168.1.0 exact match > > -Mike Swierczek > >