473,543 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PostgreSQL Database Forum

PostgreSQL ORDBMS database - Ask questions about PostgreSQL development, administration replication, clustering, connection pooling, tables, indexes, databases, performance, SQL, queries and more.
13
9,159
thread by: Relaxin | last post Nov 12 '05 by: Doug McNaught
I'm just trying to figure out the terminology that is used on this board and wanted to know what is WAL and what roll does it play in Postgresql? Thanks
4
9,158
thread by: Rajesh Kumar Mallah | last post Nov 12 '05 by: Rajesh Kumar Mallah
Hi, We need to implement following logic efficiently. SELECT * from some_table where .... IF rows_matched = 1 THEN use the single row that matched.
7
9,132
thread by: Paul Serby | last post Nov 12 '05 by: Greg Stark
Why does '*select count(id) from "tblContacts"'* do a sequential scan when the field '*id*' is indexed using a btree? MySql simply looks at the index which is keeping a handy record of the number of rows. Can anybody explain how and why postgres does this query like it does? Many thanks
1
9,107
thread by: gouse | last post Jun 14 '07 by: michaelb
Hi Friends, I would like to copy a table from one database to another database. How can I do this? Please help me. ThanQ
2
9,102
thread by: M.A. Oude Kotte | last post Nov 23 '05 by: Tom Lane
Hi All, I'm unsure if this is the correct mailinglist for my question. I have a problem with CREATE DATABASE, but as the docs state that officially this is not an SQL statement, I was unsure if I should subscribe to pgsql-sql or pgsql-general. NOTE: I've searched on google, postgresql.org, FAQ's and the static/dynamic documentation, but...
3
9,086
thread by: Chris Skaryd | last post Nov 22 '05 by: Chris Skaryd
I'm using Postgres 7.4. I have a database called tracking and user called test5. From the Red Hat command line test5 can psql tracking and run: SELECT * FROM Customers; Not surprisingly, a list of customers is shown. I have a Visual Basic application is accessing the same database. The same user can open a connection to the same...
2
9,067
thread by: SYT | last post Mar 11 '08 by: SYT
Hello, I got "Connection to database failed." error from the following C program. Could anyone help me to solve this problem? #include <stdio.h> #include <stdlib.h> #include "libpq-fe.h" int main()
2
9,063
thread by: Alejandro Javier Pomeraniec | last post Nov 12 '05 by: Alvaro Herrera
Hi ! Is there any way to get the time like the following example ? '2003-05-11 15:21:21' should return '15:21:21'
1
9,063
thread by: mscomx | last post Jan 28 '22 by: dev7060
Hi everyone ! I have to recover a database created under PostgreSQL 8.1 (Windows 2000 Professional) from a damaged pc but I have the PostgreSQL installation directory of that pc. I want to install version 8.1 on a new pc in order to recover the database. I searched all over the internet but I can't find PostgreSQL 8.1 for Windows. Does...
1
9,055
thread by: sainathr | last post May 5 '07 by: michaelb
Hi, I would like to run shell scripts with respect to the time mentioned in postgres data base tables. Postgres database should trigger the shell script for the time mentioned in the table. To make it more clear, i will add an entry like as below in postgres database table file_id script_run_time crd_extract.sh ...
5
9,050
thread by: Amin Schoeib | last post Nov 11 '05 by: elein
Hi, I would like to know if there is a Function in Postgres Like the LAST_DAY Function in Oracle?? In Oracle you can use the function the get the last day of a month. Thanxx Schoeib
1
9,025
thread by: madhupk | last post May 5 '07 by: michaelb
this is regarding C trigger function in postgresql 8.2 The function trigf reports the number of rows in the table ttest and skips the actual operation if the command attempts to insert a null value into the column x. (So the trigger acts as a not-null constraint but doesn't abort the transaction.) First, the table definition: CREATE...
6
8,998
thread by: Thomas Beutin | last post Nov 11 '05 by: Jonathan Bartlett
Hi, i've a speed problem withe the following statement: SELECT DISTINCT pz.l1_id, pz.l2_id, pz.l3_id, pz.l4_id FROM ot_adresse AS a, ot_produkt AS p LEFT OUTER JOIN ot_kat_prod AS pz ON ( p.p_id = pz.p_id ) WHERE p.a_id = a.id AND a.id = '105391105424941' AND a.m_id = '37'; This is terrible slow compared to the inner join: SELECT...
0
8,996
thread by: VamsiMadineni | last post Jun 17 '22 by: VamsiMadineni
Hi, I need to encrypt one of the existing column data and perform full db backup and share that to dev team. Please share any tools available to do that. Thanks.
6
8,991
thread by: Dino Vliet | last post Nov 23 '05 by: Björn Lundin
Hi there, I want to put a number of records (variable number depending on a attribute of a table) into a certain table with a trigger statement. I have created the follwing trigger: CREATE FUNCTION vullalles() RETURNS trigger AS ' BEGIN FOR i in 0..7 LOOP
1
8,981
thread by: osman7king | last post Sep 14 '10 by: rski
when I use the statment: "currval('my_seq')" in my function I get the error message like: "currval of sequence "my_seq" is not yet defined in this session" maybe someone explain this problem and give me the solution. best regards.
3
8,973
thread by: Glen Parker | last post Nov 23 '05 by: Tom Lane
First things first: Postgresql 8.4.2 on Fedora Core 2 X86. Something seems to have happened to my pg_xlog and pg_clog directories after (I believe) a power outage. In the course of trying to figure out why the server wouldn't start, I cleaned out pg_clog and pg_xlog, in an obviously vain attempt to reset things. I was under the impression...
8
8,954
thread by: Kragen Sitaker | last post Nov 12 '05 by: Tom Lane
ERROR: Cannot insert a duplicate key into unique index pg_class_relname_nsp_index We've been getting this error in our application every once in a while --- typically once an hour to once a day, although it varies over time. The daemon that gets the error exits and restarts a few seconds later. Usually it's fine then, but sometimes the...
3
8,920
thread by: Patrick Hatcher | last post Nov 12 '05 by: Jeff
I have a timestamp field where I find I'm doing a lot of searching by date (YYYY-MM-DD) or using this field as a match to another table that has a date format. I wanted to create an index on the timestamp field using a date format. Is this possible? I tried: CREATE INDEX test_2 ON table1 USING btree to_char(field2, 'MM-DD-YYYY'); but I...
3
8,898
thread by: arief# | last post Nov 23 '05 by: scott.marlowe
Dear all, I'm sorry if this sounds stupid or have been talked about before. Suppose I have a field in my table that's called duration with type 'time without timezone'. How do I do sum on this field based on another field let say called dateofevent? SQL: SELECT SUM(duration) FROM durtable GROUP BY dateofevent;
0
8,895
thread by: Eshwar | last post Dec 16 '21 by: Eshwar
Hi, WAL files are not getting cleared even after reaching wal_keep_segments and grows gradually , finally ended up with high disk space utlization. below is the configuration in postgresql.streaming.conf. Please help to solve this issue listen_addresses = '*' wal_level = 'hot_standby' max_wal_senders = 10 wal_keep_segments = 100...
4
8,876
thread by: Vic Cekvenich | last post Nov 23 '05 by: Oleg Bartunov
What would be performance of pgSQL text search vs MySQL vs Lucene (flat file) for a 2 terabyte db? thanks for any comments. ..V -- Please post on Rich Internet Applications User Interface (RiA/SoA) <http://www.portalvu.com> ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet,...
1
8,860
thread by: Igor Kryltsov | last post Nov 23 '05 by: Ron St-Pierre
Hi, I have table: # \d category; category_id | integer | not null default nextval('public.category_category_id_seq'::text) category_name | character varying(100) | not null Indexes: category_pkey primary key btree (category_id)
1
8,818
thread by: Clive Page | last post Nov 12 '05 by: Joe Conway
What I'd like to do is use dblink to extract a few rows from a remote database and manipulate these within a function in pl/pgsql. Something like this: CREATE OR REPLACE FUNCTION find() RETURNS INTEGER AS ' DECLARE count INTEGER: myrec RECORD; BEGIN FOR myrec IN SELECT * FROM DBLINK(''select x,y from mytab'') as
2
8,817
thread by: Cornelius Buschka | last post Nov 23 '05 by: Cornelius Buschka
Hi, we saw the following problem: We deleted all rows from a table B referencing table A (~500000 records). No problem, but the following try to delete all records from table A (~180000) lead to a "never ending" statement. We found out, that vacuuming table B after delete did the trick. It seems to us the database has to do scan thru...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.