Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged postgresql

0 votes
2.1k views
1 answer
    I am using pl/pgsql in PostgreSQL 10, to create complex queries. I am testing a query with a couple of JOINs and ANDs. This is what I have so far: ... .name LIKE $1' USING name; END; $$ LANGUAGE plpgsql; See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
467 views
1 answer
    I'm new to PostgreSQL and am having a problem with what I perceive to be a simple command DROP DATABASE and DROPDB. Why would the following commands not delete ... | | | | postgres=CTc/postgres (4 rows) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
525 views
1 answer
    In PostgreSQL, I would like to store signed values -999.9 - 9999.9. Can I use numeric(5.1) for this? Or what type should I use? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
512 views
1 answer
    I have a table with this data in Postgres and I am having a hard time to convert this in to a JSON object. node_id parent_node name ------- ---------- ... ] } ] }, ... ] } Any suggestion will help. Thanks See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
634 views
1 answer
    i'm trying to configure a rails app to remotely connect to a postgres db. i've noticed that the connection adapters for mysql have options that specify ... thanks. any help or direction is appreciated. -h See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
487 views
1 answer
    brew install postgresql Initialize... [~] initdb The files belonging to this database system will be owned by user "pma". This user must also own the server ... /pgsql_socket/.s.PGSQL.5432"? ... now what? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
598 views
1 answer
    I am trying to import a txt/csv file into my postgres database from php using "copy" command. I cannot use COPY instead of copy as I need it to execute as ... .txt" WITH ... ^ in script.php on line 30 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
307 views
1 answer
    I have a table which holds a list of IDs, and various other columns such as IDName. The Primary Key of the table is the ID itself, however it ... in the sequence). Any help would be much appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
591 views
1 answer
    I have and existing database, which I have migrated with SQLAlchemy to a new PostgreSQL database. I moved all primary keys with the same values as before. Now I ... It works for me, but I don't like it. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
817 views
1 answer
    I get an error with this query. Why? I don't understand :( SELECT p.name, p.id, SUM(hours) AS hours, SUM(logged_hours) AS logged_hours FROM ( ... AS p ON p.id = results.project_id GROUP BY project_id See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
929 views
1 answer
    I have a Postgres table posts with a column of type jsonb which is basically a flat array of tags. What i need to do is to somehow run a LIKE query on ... of select * from posts where tags @> '"%TAG%"' See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
480 views
1 answer
    Is it possible to access a Postgres database from MySQL, so that I could run a single query that does joins across tables in both databases? For example: ... t1, mysql.db2,table2 WHERE t1.id=t2.id; See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
459 views
1 answer
    I have found a bug in my application code where I have started a transaction, but never commit or do a rollback. The connection is used periodically, just reading ... ? I'm using postgresql 9.1 and 9.4. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
553 views
1 answer
    I've read a lot of potsts like this, but all the solutions I've seen are in the nomenclature of the models, naming and Rails convention. Now I ... default_scope :order=>"id" validate :expense_date... ... See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
529 views
1 answer
    I'm trying to make some prepared statements in PHP using postgres. It's a bit difficult to explaing so i'll just show you: $stmt = "SELECT * FROM ... , so I hope someone knows! Thank you in advance! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
597 views
1 answer
    I have a Postgres table bearing the following form CREATE TABLE "public"."days" ( "id" integer NOT NULL, "day" character varying(9) NOT NULL, ... name as a parameter while still keeping Postgres happy? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
429 views
1 answer
    I'm looking for a way to get the count of each column in a specific table. The columnnames should be queried from information_schema.columns. The ... have never done. Appreciated for your help. grassu See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
761 views
1 answer
    I have the following sample data for a particular column symbol for sample table. (Update:) The data is not in a regular pattern. Number ... : COL2A1 COL4A1 COL4A3 COL8A2 COL12A1 COL12A1 COL16A1 COL19A1 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
435 views
1 answer
    This a first time foray in PostgreSQL backups (db dumps) and I've been researching the different pgdump formats, other pgdump options, and ... Any other helpful pgdump/pgrestore suggestions welcome. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
521 views
1 answer
    Problem I'm building a postgres database for a few hundred thousand products. I will set-up an index (Solr or maybe ElasticSearch) to improve query ... Which other solution do I have for this problem? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    I'm trying to run Spring Boot application connected to PostgreSQL database. However, when it comes to Hikari connection pool initializing, it just gets stuck and ... .outputEncoding> <java.version>1.8</java.version> <spring-cloud.version>F...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
445 views
1 answer
    I'm developing an application for Windows Mobile 6.5 that needs to get and send data from a Postgres database within the network of the app. I've googled ... . The npgsql driver doesn't work on this sdk. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
482 views
1 answer
    postgresql has date_trunc that can truncate the time stamp value to a specific unit, like hour or minute. I want to know if there's any build-in function that ... , then convert back. But I don't like it. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
592 views
1 answer
    I am running Postgres 9.3 on MacOSX. I am trying to add a COPY statement inside a function for an automatized save-to-file process. I am new to ... with just a save-to statement within the sql function See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
454 views
1 answer
    From https://wiki.postgresql.org/wiki/Psycopg2_Tutorial PostgreSQL can not drop databases within a transaction, it is an all or nothing command. If you ... at https://stackoverflow.com/a/51880577/156458 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
433 views
1 answer
    I want to do something like this in a PL/pgSQL function in Postgres 9.6: INSERT INTO table1 (id, value) VALUES (1, 'a') ON CONFLICT DO ... statements, but this would lead to race conditions I think. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
563 views
1 answer
    I need to create a cron that runs every night and remove some of the data (older ones) from my database. I am running postgres on debian. How do ... a step by step instruction including script to do that? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
631 views
1 answer
    I have a table, Table1 that contains a XML data type column, ColumnA and another JSONB column ColumnB How do I convert the data from ColumnA into ... a built-in function in Postgres that does this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...