tagged [postgresql]

Generating time series between two dates in PostgreSQL

Generating time series between two dates in PostgreSQL I have a query like this that nicely generates a series of dates between 2 given dates: It generates 162 dates between `2004-03-07` and `2

How to change owner of PostgreSql database?

How to change owner of PostgreSql database? I need to change the owner of PostgreSql database. How to change owner of PostgreSql database in phppgadmin?

15 May at 15:34

PostgreSQL delete all content

PostgreSQL delete all content Hello I want to delete all data in my postgresql tables, but not the table itself. How could I do this?

27 Feb at 10:0

Export specific rows from a PostgreSQL table as INSERT SQL script

Export specific rows from a PostgreSQL table as INSERT SQL script I have a database schema named: `nyummy` and a table named `cimory`: I want to export the `cimory` table's data as insert SQL script f...

How to copy from CSV file to PostgreSQL table with headers in CSV file?

How to copy from CSV file to PostgreSQL table with headers in CSV file? I want to copy a CSV file to a Postgres table. There are about 100 columns in this table, so I do not want to rewrite them if I ...

27 Apr at 09:21

Creating a copy of a database in PostgreSQL

Creating a copy of a database in PostgreSQL What's the correct way to copy entire database (its structure and data) to a new one in pgAdmin?

11 Jan at 21:17

PostgreSQL naming conventions

PostgreSQL naming conventions Where can I find a detailed manual about PostgreSQL naming conventions? (table names vs. camel case, sequences, primary keys, constraints, indexes, etc...)

15 Jun at 19:48

Copy a table from one database to another in Postgres

Copy a table from one database to another in Postgres I am trying to copy an entire table from one database to another in Postgres. Any suggestions?

11 Oct at 19:44

How to list records with date from the last 10 days?

How to list records with date from the last 10 days? Does this work on PostgreSQL?

2 Jul at 01:9

How to list indexes created for table in postgres

How to list indexes created for table in postgres Could you tell me how to check what indexes are created for some table in postgresql ?

2 Jul at 17:7

How to insert a row in postgreSQL pgAdmin?

How to insert a row in postgreSQL pgAdmin? I am new to postgreSQL. Is there any way to insert row in postgreSQL pgAdmin without using SQL Editor (SQL query)?

30 Mar at 19:21

Check if a Postgres JSON array contains a string

Check if a Postgres JSON array contains a string I have a table to store information about my rabbits. It looks like this: ``` create table rabbits (rabbit_id bigserial primary key, info json not null...

13 Nov at 00:57

change pgsql port

change pgsql port I have currently an installed pgsql instance that is running on port `1486`. I want to change this port to `5433`, how should I proceed for this?

23 Jul at 04:51

How to limit rows in PostgreSQL SELECT

How to limit rows in PostgreSQL SELECT What's the equivalent to SQL Server's `TOP` or DB2's `FETCH FIRST` or mySQL's `LIMIT` in PostgreSQL?

6 Mar at 13:46

What is the format for the PostgreSQL connection string / URL?

What is the format for the PostgreSQL connection string / URL? What is the format for the PostgreSQL connection string (URL `postgres://...`) when the host is not the localhost?

7 Feb at 01:59

Copying PostgreSQL database to another server

Copying PostgreSQL database to another server I'm looking to copy a production PostgreSQL database to a development server. What's the quickest, easiest way to go about doing this?

19 Jun at 17:7

Getting the encoding of a Postgres database

Getting the encoding of a Postgres database I have a database, and I need to know the default encoding for the database. I want to get it from the command line.

22 Mar at 05:8

How to import existing *.sql files in PostgreSQL 8.4?

How to import existing *.sql files in PostgreSQL 8.4? I am using PostgreSQL 8.4, and I have some *.sql files to import into a database. How can I do so?

28 Jan at 07:19

Is it possible to specify the schema when connecting to postgres with JDBC?

Is it possible to specify the schema when connecting to postgres with JDBC? Is it possible? Can i specify it on the connection URL? How to do that?

How to list table foreign keys

How to list table foreign keys Is there a way using SQL to list all foreign keys for a given table? I know the table name / schema and I can plug that in.

29 Apr at 19:39

Run PostgreSQL queries from the command line

Run PostgreSQL queries from the command line I inserted a data into a table....I wanna see now whole table with rows and columns and data. How I can display it through command?

31 Jul at 21:15

How do I alter the position of a column in a PostgreSQL database table?

How do I alter the position of a column in a PostgreSQL database table? I've tried the following, but I was unsuccessful:

27 Apr at 14:47

Right query to get the current number of connections in a PostgreSQL DB

Right query to get the current number of connections in a PostgreSQL DB Which of the following two is more accurate?

28 Mar at 09:32

Generate the ERD for an existing database

Generate the ERD for an existing database I have a PostgreSQL database. I want to generate ERD from that database. Are there any built-in tools to do it or maybe some third-party tools?

23 Dec at 02:9

Hibernate 'Inverse' in mapping file

Hibernate 'Inverse' in mapping file Can someone explain the use of inverse in the xml mapping file, I am reading the tutorial but failing to understand its use in the mapping file?? Thanks

14 Dec at 13:41