2

I need support for the uuid library in my Postgres server (a 64-bit Amazon Linux AMI). I've installed the uuid and uuid-pgsql packages. Is it possible to load the library without restarting the Postgres server?

PostgreSQL version is 8.4.11.

Adam Sharp
  • 251
  • 1
  • 2
  • 10
  • Have you read and followed the instructions in [the PostgreSQL manual](http://www.postgresql.org/docs/9.1/static/sql-createextension.html)? – voretaq7 Jun 15 '12 at 15:11
  • @voretaq7 actually I'm on 8.4, so I don't think I have CREATE EXTENSION. This is the closest I've found, but suggest I have to restart the server anyway: http://stackoverflow.com/questions/1564056/how-do-i-import-modules-or-install-extensions-in-postgres-8-4 – Adam Sharp Jun 18 '12 at 06:24
  • Indeed, `CREATE EXTENSION` is a 9.x (I believe 9.0) feature. (You should probably include your Postgres version in your question - absent any version-specific clues folks generally tend to assume "the latest stable release" :-) – voretaq7 Jun 18 '12 at 19:24

1 Answers1

0

On 8.4.x you should be able to activate the extension once installed by simply loading the SQL file that came with it (the extensions are basically collections of C functions and other goodies - Postgres loads that stuff dynamically). The stack overflow question you linked to talks about how to go about this (it's discussed in the manual waaaaay in the back in Appendix F - "Additional Supplied Modules"

On 9.1 (I had the wrong version in my comment) and later this functionality has been subsumed by the CREATE EXTENSION/ALTER EXTENSION SQL commands -- Module installation is essentially the same, only instead of having to load the SQL file manually the necessary changes are handled for you by Postgres when you run CREATE EXTENSION.

voretaq7
  • 79,879
  • 17
  • 130
  • 214