Coder Social home page Coder Social logo

Comments (10)

md5 avatar md5 commented on July 24, 2024 2

I just tested this with postgres --single and it worked fine. I'm wondering whether you're trying to run uuid_generate_v4() in a different database than the one that CREATE EXTENSION was run against.

from postgres.

AlexMesser avatar AlexMesser commented on July 24, 2024 1

I have this error on postgres docker running on windows. Same tests with exactly same codebase and docker postgres image works fine on osx.

from postgres.

yosifkit avatar yosifkit commented on July 24, 2024

Is this in a postgres --single? create extension doesn't work in postgres single user mode (https://stackoverflow.com/questions/28147177/do-create-extension-work-in-single-user-mode-in-postgres).

from postgres.

md5 avatar md5 commented on July 24, 2024

@yosifkit Only extensions that create custom types and expect to be able to use the implicit array types will fail. Other extensions that don't do that, including uuid-ossp, should work.

I just tried to reproduce @AlexZeitler's error with a Postgres 9.4 image and did not receive that error.

from postgres.

md5 avatar md5 commented on July 24, 2024

Also, in this case there will not be an implicit uuid[] type for later use in table definitions and elsewhere.

(Update: this comment is incorrect since the uuid-ossp extension does not create the uuid type)

from postgres.

md5 avatar md5 commented on July 24, 2024

@AlexZeitler How did you run that? I ran it in a psql shell, not in postgres --single mode as @yosifkit mentioned.

from postgres.

AlexZeitler avatar AlexZeitler commented on July 24, 2024

@md5 I mapped the ports to my host and used pgAdminIII on the host.

from postgres.

AlexZeitler avatar AlexZeitler commented on July 24, 2024

Thanks @yosifkit, @md5

Looks like I did something wrong.

I logged into the container and tried psql and it worked.
After that I tried it again using JetBrains 0xDBE and when selecting all statements and adding end; as well and then executing all selected statements everything works fine.

from postgres.

rivanbello avatar rivanbello commented on July 24, 2024

This problem occurred to me when I tried to run migrations without being a super user.
I used the docker to create the container, I created a user with a custom name, thus losing the super user power.
Then I recreated the container without defining a name for the user (the default is "postgres"), I just defined the password, so everything worked fine to run the migrations.

from postgres.

GitVijayDv avatar GitVijayDv commented on July 24, 2024

sudo yum install postgres*contrib
sudo apt install postgres-contrib

from postgres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.