![]() If you see a syntax error, check your SQL code and make sure there are no errors. You should see a success message like so: In the new query window add the following: To do that, we need to write a new query. We’re going to use our connection to this database to create another one, where we’re going to drop some data. This is the admin playground, where you can do DBA stuff and feel rad. If you’ve connected already, you might be wondering “what, exactly, am I connected to”? Good question Friendo! You’re connected to the default database, “postgres”: Azure Data Studio doesn’t (for Postgres at least) but that’s OK, we’ll create one for ourselves. Our first database Most GUI tools have some way of creating a database right through the UI. We’ll go with the default database and, finally, name our connection “Local Docker”. The server name is “localhost” and the Docker image comes with the login preset - “postgres” as the user name and “postgres” as the password. You’ll know if you do because you’ll see the option to connect to PostgreSQL in the connection dialog: ![]() Open up Azure Data Studio and make sure you have the Postgres extension installed. Our first login Let’s connect to our new shiny Postgres server. I love this thing.ĭon’t know what to choose? Just download Azure Data Studio and let’s get to work! It’s a bit on the spendy side but you can do all kinds of cool things, including reports, charting, import/export, data modeling and more. Something substantial and you’re willing to pay for it (Windows and Mac) My go-to tool for working with Postgres is Navicat. You can install it right from the IDE by clicking on the square thingies in the bottom left of the left-most pane. To hook up to Postgres, make sure you grab the Postgres extension. There are extensions and all kinds of goodies you can download if you want as well. There’s the free Azure Data Studio which uses the same interface as VS Code. It’s easy and you can quickly connect and start playing. Just playing around: Mac If you’re on a Mac go get yourself a free copy of Postico. There is no clear cut answer to this question other than to offer the following options for a given context. ![]() Tooling for Postgres is both abundant and wanting. If you’re not a Docker person and are on a Mac, you can also head over to where you can download a free executable app. That will download and run a Postgres image, exposing the default Postgres port of 5432. The easiest possible thing you can do is to run a docker image, which you can do by executing: If you're having fun and want to do more, I wrote a really fun book about Postgres and the data from the Cassini mission (which you'll see below) that you're welcome to check out too! Where is Postgres? How do I get it and run it? I encourage you to play along if you're curious. Part 2 (next post) will be for Node people wondering what/why/how they could work with Postgres.Part 1 (this post) is for people who've never thought about a database before, let alone set one up and run a query.He has a lot of questions, so I'm going to break this up into parts: If you’re like Friendo and you want to start from the very beginning with Postgres, read on! I’ll use his questions to me for the rest of this post. ![]() That said, there are benefits to wrapping structure and rules around your data - it is the lifeblood of your business after all. ![]() Can’t blame him - it’s easy to setup, easy to run and you don’t need to stress out about SQL and relational theory. So, Friendo is a Node person who enjoys using a document database. This person calls themself my friend too! I just don’t even know what’s real anymore. I can't even with Postgres, I know JACK SQUAT Just yesterday I was talking to a friend about Postgres (not uncommon) and he said something that I found shocking: ![]()
0 Comments
Leave a Reply. |