[GENERAL] Why my queryes doesnt not use indexes?

2009-06-22 Thread DaNieL
Hi guys, i am in trouble with some simple data that seem like doesnt use any index.. and i dont know why. My test database structure is this one: -- CREATE TABLE users( id BIGSERIAL NOT NULL PRIMARY KEY, nickname varchar(50), email varchar(50) NOT NULL ); CREATE INDEX users_nick_i

[GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL
Hi guys, im tryin to optimize a simple table, suited for contain users. So, my table at the moment is: - CREATE TABLE contacts( id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE, company_id BIGINT, code varchar(10), company_name varchar(120), name varchar(120), surname varchar(120), phone varcha

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
Almost forgot: one fo the heavier select query can be: - SELECT contact.id, contact.company_id, contact.name AS nome, contact.surname AS cognome, contact.email AS email, contact.company_name AS azienda FROM contact WHERE ( lower(contact.company_name) LIKE 's

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
The `problem` is that i dont know if having so many indexes will raise problems as the data dimension grown. And i am not even sure that this design is truly reliable; For example, if i would to know how many employees have every company, i'll have to run that query: - EXPLAIN ANALYZE SELECT

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
y users) On 23 Giu, 16:29, gryz...@gmail.com (Grzegorz Jaśkiewicz) wrote: > 2009/6/23 DaNieL..! : > > > The `problem` is that i dont know if having so many indexes will raise > > problems as the data dimension grown. > > That seem to be not very efficient:http://explain.

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
I thought to analyze the input chars to avoid useless searches, for example, if the digit is EX, where X is number, it is the user_code, and i'll search just that field; otherwise if the digit is an email, i'll look only at the email column. But, the things get little deeper, with the custom f

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
ows isn't liable to stress any > reasonably modern server, likely several times over that shouldn't either > for simple "LIKE" searches. > What kind of growth are you expecting? > > > > > -Original Message- > > From: pgsql-general-ow...@po

[GENERAL] ts_headline and query with hyphen

2012-12-04 Thread daniel
tom-built' & 'custom' & 'built' select ts_headline('custom-built query', to_tsquery('query & custom-built')); ts_headline - custom-built query This works better, but still bo

Re: [GENERAL] ts_headline and query with hyphen

2012-12-04 Thread daniel
On 12/05/2012 04:49 AM, Tom Lane wrote: daniel writes: I have a question about ts_headline, when the query includes word like 'on-line' - only the 'line' part is highlighted, even though the whole phrase is indexed too, some details below. Part of the reason is that &qu

Re: [GENERAL] ts_headline and query with hyphen

2012-12-04 Thread daniel
As a follow up to my previous comment, this is a cutting example select ts_headline('game played on-line', to_tsquery('on-line & game'), 'MaxWords=3,MinWords=2,ShortWord=1'); ts_headline --- game played on that can't be right

Re: [GENERAL] How to link with postgresql in gcc?

2009-11-22 Thread Daniel
OK, sorry forget this post I made some progress and now have a slighty different problem, so i'll start a new post. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] error linking with PostgreSQL

2009-11-22 Thread Daniel
Here is the code: #include "libpq-fe.h" #ifndef HDBUTIL #define HDBUTIL class DBConn { public: PGconn pg_conn; bool Connect(); bool Disconnect(); }; #endif ... and here is the make error: tux tb # make g++ -Wall -g -o0 -lpq -I/usr/include/postgresql/libpq-4 server.cpp d

[GENERAL] How to link with postgresql in gcc?

2009-11-22 Thread Daniel
When running a gcc makefile how do I tell the linker about postgres? I have installed postresql and lsof and I am running all this on Gentoo Linux. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-

[GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel
I have written a C/C++ program that trys to log into a local PostgreSQL database. Here is the code: pg_conn = PQconnectdb( "hostaddr = '127.0.0.1' port = '' dbname = 'TBDB' user = 'sysdba' password = 'stelmo777' connect_timeout = '10'"); if (!pg_conn) { return false; } if (P

[GENERAL] Strange. I can logon with an invalid or no password atall

2009-12-02 Thread Daniel
My program is reporting "Logged on." even if I enter an invalid or no password atall. Here is my login function and below is the function that calls it: bool DBConn::Connect(const std::string &host, const std::string &user, const std::string &pass) // Connects to the database { std::string cs

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel
Oops, as it happens I had an error in my program logic and pg_conn was actually true. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Strange. I can logon with an invalid or no password atall

2009-12-03 Thread Daniel
Thanks. I did not realise it was so configurable. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Examples of using PQexecParams

2009-12-04 Thread Daniel
I was looking for examples of using PQexecParams but all I found was this: http://sepp.oetiker.ch/postgresql-8.2.3-ds/libpq-example.html /* Convert integer value "2" to network byte order */ binaryIntVal = htonl((uint32_t) 2); /* Set up parameter arrays for PQexecParams */ paramValues[0] =

Re: [GENERAL] Examples of using PQexecParams

2009-12-05 Thread Daniel
> check out libpqtypes (http://libpqtypes.esilo.com).  It does all the > binary stuff for you (which you don't need to to with PQexecParams). > thanks, but how do you install it on Gentoo, there is no ebuild. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

[GENERAL] Use a blob or not?

2009-12-07 Thread Daniel
I want ot store chunks of data (only about five Kb each) on a database and have users download (across a network) these chunks to their local disk drive. Is a blob a good way to store these chunks? Thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] ERROR: syntax error at or near "IF"... why?

2009-04-30 Thread DaNieL..!
On 30 Apr, 07:30, Johan Nel wrote: > Daniel, > > > IF (SELECT credit FROM users WHERE name = 'mary') < 0 THEN > >  ROLLBACK; > > END IF > > COMMIT; > > > i always get the error > > ERROR:  syntax error at or near "IF" > &

[GENERAL] ERROR: syntax error at or near "IF"... why?

2009-05-01 Thread DaNieL
Hi guys, im new with postgresql, and already got my first problem.. Well, I wroted some code for understend how the transaction works, following step by step the manual. TO make it short, i've created 2 tables, user and movements: in the firs one there are the name, email and credit colons, in th

[GENERAL] PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query

2009-05-04 Thread DaNieL
Hi guys, this is my first approach to postgresql.. Well, lets say that i have 3 tables: orders, customer, and order_item. The tables are really simple: --- CREATE TABLE customer ( id integer NOT NULL, name character(50) ); --- CREATE TABLE orders ( id integer NOT NULL, id_customer

Re: [GENERAL] PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query

2009-05-05 Thread DaNieL..!
Hi guyst.. thanks for the replies, really, them make me suppose that all what i've learned of sql from mysql can be wrong.. But still i have some trouble to understand the functionality of the orders example. My first goal is to retrieve every order, the customer name, and the total of the idems p

[GENERAL] Import Data from MS SQL Server

2006-06-07 Thread Daniel
Hi.. Im Daniel and need soem help in importing data from MS SQL Server to Postgresql DB. Is there a bulit in option for importing from Postgresql? Help me out!! Regards, Daniel. ---(end of broadcast)--- TIP 5: don't forget to increase

[GENERAL] BackUp

2006-06-21 Thread Daniel
Hi All.. Is there a way to do auto database bacl up in "PostgreSQL". Please Reply.. Thanks, Daniel ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] pgsql on debian

2004-06-27 Thread daniel
1)from root su postgres 2)createuser the username 3)exit 4)su the user 5)createdb psql the database Jay wrote: hi oliver i tried the following command but nothing seems to work psql -U root -d root psql: FATAL: IDENT authentication failed for user "root" any suggestions thanks jay Oliver Elphick w

[GENERAL] create table if not exists xx AS select ...

2015-03-22 Thread Daniel Caldeweyher
s test2 as */ create table test2 as select * from test where 1=0; Thanks Daniel

Re: [GENERAL] create table if not exists xx AS select ...

2015-03-22 Thread Daniel Caldeweyher
Thanks Michael, I suppose I should have checked the docs for CREATE TABLE AS and not just CREATE TABLE :) Regards, Daniel On Mon, Mar 23, 2015 at 11:41 AM, Michael Paquier wrote: > On Mon, Mar 23, 2015 at 10:28 AM, Daniel Caldeweyher > wrote: > > I am not entirely sure if t

Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?

2015-05-02 Thread Daniel Verite
ignore it, or drop it, whatever is more convenient. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
nly message I get is: "Postgresql-x64-9.3 service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs" I am the only user of the database Hoping someone can help Daniel

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
I just get it back running with the old drive - was some Windows hidden behavior! However, does someone could tell me what went wrong with the procedure I used to move the DB? And/or what procedure I should have used in order to get it right? Daniel -Original Message- From: Raymond

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
this tablespace as the new location of... - the postgres database - my personal database - pg_default - pg_global Anything I missed or put in the wrong sequence? Regards, Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
is what I have just tried when I got “Could not read symbolic link “pg_tblspc/100589”: Invalid argument” Considering both drives are identical, could an image backup have done the job properly instead of a plane copy? Daniel -Original Message- From: pgsql-general-ow...@postgresq

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
s. I am getting closer to the initial problem, and closer to the solution! Maybe an image backup of the drive would have done the job properly instead of using a plane copy? Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.or

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-13 Thread Daniel Begin
tories to exist before the restore". External tablespaces directories are easy to create but what's about pg_default and pg_global tablespace since I never created specific tablespaces for them? Thank for your patience Daniel -Original Message- From: pgsql-general-ow...@post

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-13 Thread Daniel Begin
Thank John, I was naive hoping I just had to run "$ psql -f pgdumpall.output postgres"... but it makes sense since the drive on which it is all stored won't be there anymore. So let's read initdb documentation :-) Daniel -Original Message- From: pgsql-general-

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-15 Thread Daniel Begin
uild... does someone could confirm indexes are rebuilt instead of copied? If indexes are actually rebuilt, why should it be done that way? - There must be good reason! Best regards, Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgres

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-15 Thread Daniel Begin
drive's letter to the old one before restarting the db is easy -The whole process should take 12hours instead of a week. Hoping it makes sense and that I have not missed something important (again) Thank for your patience :-) Daniel -Original Message- From: pgsql-gener

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-16 Thread Daniel Begin
, the time expected to run queries on some tables seems longer. - Could copying tables and indexes have had an effect on indexes? - How can I verify that some of the indexes were not corrupted? Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow

[GENERAL] date with month and year

2015-05-21 Thread Daniel Torres
ract (Year from '2001-05-01 20:21:00'::TIMESTAMP WITHOUT TIME ZONE)||'-'|| extract(Month from '2001-05-01 20:21:00'::TIMESTAMP WITHOUT TIME ZONE); Any help is welcome, thanks Daniel

Re: [GENERAL] date with month and year

2015-05-21 Thread Daniel Torres
7;m new at using postgresql) Thank you, Daniel 2015-05-21 12:45 GMT-05:00 Paul Jungwirth : > You really shouldn't use WITHOUT TIME ZONE. >> > > I'd like to know more about this. Can you say why? Are there any articles > you'd recommend? I'm fond of normalizin

[GENERAL] FW: Constraint exclusion in partitions

2015-05-22 Thread Daniel Begin
ning the large table was appropriate and if the queries are going to be longer to run. Thank in advance Daniel Doc: http://www.postgresql.org/docs/9.3/static/ddl-partitioning.html

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-23 Thread Daniel Begin
get back to my old fat table unless someone tells me I missed something obvious! Daniel Note: Tables/indexes description, queries and execution plans are below. Tables/indexes description -- The original table

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-23 Thread Daniel Begin
was used at least for constant id and range of ids Daniel From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of melvin6925 Sent: May-23-15 15:15 To: Daniel Begin; pgsql-general@postgresql.org Subject: Re: [GENERAL] FW: Constraint exclusion

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-23 Thread Daniel Begin
g time) but I swear, I did not change the times when editing table names!-) Do you see any glitch/flaw in the procedure I am using? Someone has an idea about the problem behind this unexpected behavior? I really need to get much faster results with my queries on this large table and partitioni

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-23 Thread Daniel Begin
Oops, I was responding to the email below from melvin6925 From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G. Johnston Sent: May-23-15 19:32 To: Daniel Begin Cc: melvin6925; pgsql-general@postgresql.org Subject: Re: [GENERAL] [NOVICE

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-25 Thread Daniel Begin
graphy type. I am running all this on my personal PC: Windows 64b, i7 chip, 16GB ram. I am using PostgreSQL 9.3 and the database cluster is spread over 2X3TB external drives with write caching. Best regards, Daniel Results/explain/analyse follow...

[GENERAL] Planner cost adjustments

2015-05-29 Thread Daniel Begin
should look at first? Daniel

Re: [GENERAL] Planner cost adjustments

2015-05-29 Thread Daniel Begin
Omg! I was not expecting such a step-by-step procedure, thanks! I'll follow the guide :-) Since I was about to provide a bit of context as asked by Tomas, here it is for those who are interested... Best regards, Daniel A bit of the required context... I am running all this on my person

Re: [GENERAL] Planner cost adjustments

2015-05-29 Thread Daniel Begin
s that "on Windows the useful range is 64MB to 512MB". Best regards, Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Tomas Vondra Sent: May-29-15 20:19 To: Daniel Begin; 'PT' Cc: pgsql-gene

Re: [GENERAL] Planner cost adjustments

2015-06-02 Thread Daniel Begin
illions of records while others only one). This is the farthest I can go at this point. Maybe someone can provide me with more explanations regarding planner's behavior and ways to go further to make it work properly? Best regards, Daniel -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] Planner cost adjustments

2015-06-03 Thread Daniel Begin
PostgreSQL developers so they can improve the planner). And I am still open to other proposal Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Bill Moran Sent: June-02-15 23:31 To: Daniel Begin Cc: pgsql-general

[GENERAL] Problem when temp_tablespace get full?

2015-06-03 Thread Daniel Begin
PC - The SSD drive and the data are still there but the drive keeps going off without warning. I know I will have to change my drive!-) But ma question is: What append the temp_tablespace drive get full? Daniel

Re: [GENERAL] Problem when temp_tablespace get full?

2015-06-03 Thread Daniel Begin
react/manage the situation? Daniel From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G. Johnston Sent: June-03-15 11:54 To: Daniel Begin Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Problem when temp_tablespace get full? On

[GENERAL] replicating many to one

2015-06-04 Thread Doiron, Daniel
I have a situation where I need to replicate the databases in 4 clusters on 4 individual servers to a single cluster on 1 server. So far, the best option looks like pgpool statement-based replication, the major down side being sequences. Does anyone know a better way to achieve this type of repl

Re: [GENERAL] replicating many to one

2015-06-04 Thread Doiron, Daniel
lf Of John R Pierce Sent: Thursday, June 04, 2015 2:46 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] replicating many to one On 6/4/2015 10:07 AM, Doiron, Daniel wrote: > I have a situation where I need to replicate the databases in 4 > clusters on 4 individual servers to a single c

Re: [GENERAL] Planner cost adjustments

2015-06-10 Thread Daniel Begin
rget to 500, or even to 1000? Is there something else I can trigger to get the appropriate plan? Comments/explanations would be appreciated Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Daniel Begin Sent: June

Re: [GENERAL] Planner cost adjustments

2015-06-11 Thread Daniel Begin
best solution but the problem is definitely narrower :-) Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Bill Moran Sent: June-11-15 06:51 To: Daniel Begin Cc: pgsql-general@postgresql.org; 'Tomas Vondra'; &

Re: [GENERAL] Planner cost adjustments

2015-06-19 Thread Daniel Begin
o all, Daniel -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Francisco Olarte Sent: June-11-15 10:05 To: Daniel Begin Cc: Bill Moran; pgsql-general@postgresql.org; Tomas Vondra; Melvin Davidson Subject: Re: [GENERAL] Pl

Re: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Daniel Verite
tion and fix. Personally I don't understand in the first place how UTF-8 is handled with '*.1252' locales, as cp1252 seems incompatible with UTF-8 by definition. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] utf8 encoding problem with plperlu

2015-07-15 Thread Daniel Verite
Anyway it's not clear what you expect. PG doesn't support UTF-16, and even if it did, it wouldn't accept such strings when the current encoding is UTF-8. If Active Directory wants UTF-16LE, you have to do that conversion, but don't pass the result back to postgres in this format.

Re: [GENERAL] INSERT ... ON CONFLICT DO UPDATE

2015-07-19 Thread Daniel Verite
ovement in ease of use. And presumably in performance too. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @ManitouMail -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] INSERT ... ON CONFLICT DO UPDATE

2015-07-19 Thread Daniel Verite
ious to guess what is the next one, so malicious people could claim access codes or vouchers they don't own. The constraint is that such codes must be reasonably short, but someone who tries to make up one must have a near-zero chance of guessing one that actually exists. Best regards, -- Da

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-26 Thread Daniel Verite
hat pg_database_size() can report. Maybe at some point all these will be 128 bits, but that's years ahead. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] clone_schema function

2015-09-11 Thread Daniel Verite
TE FUNCTION, DECLARE would become DECLBRE and so on. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [GENERAL] clone_schema function

2015-09-12 Thread Daniel Verite
of patching the entire body of a function without a fully-fledged parser that is dead on arrival. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Advise on memory usage limitation by PostgreSQL on Windows

2015-09-23 Thread Daniel Begin
set shared_buffers = 128MB with an effective_cache_size = 12GB Daniel From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Venkata Balaji N Sent: September-22-15 21:33 To: pgsql-general Subject: [GENERAL] Advise on memory usage limitation by

[GENERAL] PostgreSQL and Windows 10 upgrade

2015-09-23 Thread Daniel Begin
Does anyone running PostgreSQL 9.3 on Windows 7 has upgraded to Windows 10? Successfully or not. Daniel

[GENERAL] Unexpected query result

2015-10-05 Thread Begin Daniel
In order to process a large amount of data I need to run a procedure using parallel batch processes. The query I run in each process is expected to ... 1- select a bunch of id (500) in a table (wait4processing) containing the list of all records to process2- remove selected records from wait4pro

Re: [GENERAL] Unexpected query result

2015-10-05 Thread Begin Daniel
Thank Adrian, it makes sense. I'll adapt the calling procedures Daniel > Subject: Re: [GENERAL] Unexpected query result > To: jfd...@hotmail.com; pgsql-general@postgresql.org > From: adrian.kla...@aklaver.com > Date: Mon, 5 Oct 2015 06:17:33 -0700 > > On 10/05/2015 05:02

Re: [GENERAL] md5(large_object_id)

2015-10-06 Thread Daniel Verite
2.5 seconds to digest a 100 MB audio file already in cache. An independant Perl script doing the equiavlent processing on the same data takes 0.4s . It's not because of Digest::MD5 or loread(), it seems that it's the pipe in-between with the text->bytea decoding that eats most of the CPU

Re: [GENERAL] Issues with german locale on CentOS 5,6,7

2015-10-08 Thread Daniel Verite
something like that make sense? Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] *** QUESTION *** After successful 'BEGIN;' command -- why PGSQL_TRANSACTION_ACTIVE and not PGSQL_TRANSACTION_INTRANS?

2015-10-12 Thread Daniel Verite
, which corresponds to PGSQL_TRANSACTION_INTRANS as expected. OTOH if commenting the call to pg_get_result($dbcnx), then it ouputs 1 (PGSQL_TRANSACTION_ACTIVE) as you mentioned. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsq

[GENERAL] Does PostgreSQL ever create indexes on its own?

2015-11-12 Thread Doiron, Daniel
I’m troubleshooting a schema and found this: Indexes: "pk_patient_diagnoses" PRIMARY KEY, btree (id) "index_4341548" UNIQUE, btree (id) "idx_patient_diagnoses_deleted" btree (deleted) "idx_patient_diagnoses_diagnosis_type_id" btree (diagnosis_type_id) "idx_patient_diagnoses_icd

Re: [GENERAL] Does PostgreSQL ever create indexes on its own?

2015-11-13 Thread Doiron, Daniel
omas Kellerer writes: >> Doiron, Daniel schrieb am 12.11.2015 um 23:21: >>> I¹m troubleshooting a schema and found this: >>> >>> Indexes: >>> "pk_patient_diagnoses" PRIMARY KEY, btree (id) >>> "index

[GENERAL] Deleting a table file does not raise an error when the table is touched afterwards, why?

2016-05-30 Thread Daniel Westermann
-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit Thanks in advance Daniel

Re: [GENERAL] Deleting a table file does not raise an error when the table is touched afterwards, why?

2016-05-30 Thread Daniel Westermann
>>> >>>On Mon, 30 May 2016 17:35:34 +0200 (CEST), Daniel Westermann >>>(daniel.westerm...@dbi-services.com) wrote about "[GENERAL] Deleting a >>>table file does not raise an error when the table is touched >>>afterwards, why?" (in

Re: [GENERAL] Deleting a table file does not raise an error when the table is touched afterwards, why?

2016-05-30 Thread Daniel Westermann
>> Alex Ignatov started a new thread was started on this topic as well...​ >> >> https://www.postgresql.org/message-id/c571dfc5-91b0-0df2-4e3f-45bc94c11...@postgrespro.ru >> >> >>I posted a link to this thread on his new one as well. >> >>David J.​ for completeness: same issue with data c

[GENERAL] Why are no NEGATORS defined in the standard operators

2016-06-11 Thread Daniel Migowski
, why there is no NEGATOR clause defined here? According to the docs it should help to add NEGATOR = <> In query optimization. Is there some reason for it? Or is it a Bug in pgAdmin III that the negator is not shown? Regards, Daniel Migowski

Re: [GENERAL] Why are no NEGATORS defined in the standard operators

2016-06-11 Thread Daniel Migowski
OK, I file a bug report. -Ursprüngliche Nachricht- Von: Julien Rouhaud [mailto:julien.rouh...@dalibo.com] Gesendet: Samstag, 11. Juni 2016 11:28 An: Daniel Migowski ; pgsql-general@postgresql.org Betreff: Re: [GENERAL] Why are no NEGATORS defined in the standard operators Hello On 11

Re: [GENERAL] psql connection option: statement_timeout

2016-07-04 Thread Daniel Verite
statement_timeout=1000 -c geqo=off'" psql (9.3.13) Type "help" for help. test=> show statement_timeout ; statement_timeout --- 1s (1 row) Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite

Re: [GENERAL] Merging timeseries in postgres

2016-07-14 Thread Begin Daniel
join, your query returns no records for the given data. David J. ​ Look at the above documentation (7.2.1.1) on full join https://www.postgresql.org/docs/9.3/static/queries-table-expressions.html select coalesce(dx,dx1)as dt, n, nx1 from test full join test1 on dx=dx1; Daniel

Re: [GENERAL] Sequential vs. random values - number of pages in B-tree

2016-08-18 Thread Daniel Verite
https://wiki.postgresql.org/wiki/XTEA Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Sequential vs. random values - number of pages in B-tree

2016-08-19 Thread Daniel Verite
rsed in the [0..1e7] range or equally well dispersed in the [0..2**32] range, the probability of a newly inserted value to compare greater or lower to any previous values of the list should be the same, so shouldn't the page splits be the same, statistically speaking? Best regards, -- Daniel Véri

[GENERAL] Do function calls the cached?

2016-08-30 Thread Daniel Caldeweyher
I should penalize the function with a high cost. But I don't see how this has any benefit in this case other than mess up the rest of my query plan. Thanks, Daniel

Re: [GENERAL] Do function calls the cached?

2016-09-01 Thread Daniel Caldeweyher
Thanks David, Lateral did the trick: CREATE VIEW with_keywords AS SELECT x,y,z, keywords.a, keywords.b, keywords.c FROM large_table l, LATERAL extract_keywords(l.*) keywords(a,b,c) Regards, Daniel On Wed, Aug 31, 2016 at 6:46 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: &g

Re: [GENERAL] Duplicate data despite unique constraint

2016-09-10 Thread Daniel Caldeweyher
ber. Ensure you are still skipping indexes. Once the table is clean, drop the sequence column again and re-index. Hope this helps, Daniel On Fri, Sep 2, 2016 at 11:06 PM, Albe Laurenz wrote: > Jonas Tehler wrote: > > We’re running Postgresql 9.4.5 on Amazon RDS. One of our tables looks

[GENERAL] Maximum number of exclusive locks

2016-09-13 Thread Daniel Verite
about, but why would the above formula underestimate the number of object locks actually available to a transaction? Isn't it supposed to be a hard cap for such locks? Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via p

Re: [GENERAL] Query help

2016-10-04 Thread Daniel Caldeweyher
Try this: select distinct vendor_no, vendor_name from ap_vendors where vendor_no in ( select vendor_no from ap_vendors group by vendor_no having array_agg(company_code) @> ARRAY['BUR','EBC','SNJ']) On Wed, Oct 5, 2016 at 1:31 PM, Bret Stern wrote: > Good evening, > I'm curious about a

Re: [GENERAL] Errors while installing PostGIS by an unusual method

2016-10-25 Thread Daniel Caldeweyher
Hi Ankit, You might have specific requirements to need PG 9.6. But if 9.5 is sufficient, it will be easier to simply do a rpm/yum install. Regards, Daniel On Tue, Oct 25, 2016 at 4:08 AM, Ankit Sablok wrote: > Thanks for replying Tom and Asif, I think the issue was that libpq.so > pres

Re: [GENERAL] initdb createuser commands

2016-10-31 Thread Daniel Verite
agewise through text files SYNOPSIS pg [-number] [-p string] [-cefnrs] [+line] [+/pattern/] [file...] ... Also, the same Debian/Ubuntu systems don't have initdb or pg_ctl in the default $PATH, as these commands are superseded by different distro-specific pg_* commands . This is also somet

[GENERAL] Documentation archive links broken for 6.3 up to 7.1

2016-11-07 Thread Daniel Westermann
Hi, just noticed that the links from 6.3 to 7.1 are broken here: https://www.postgresql.org/docs/manuals/archive/ Regards Daniel

Re: [GENERAL] Storing files: 2.3TBytes, 17M file count

2016-11-28 Thread Daniel Verite
ithic pg_largeobject would likely be problematic. Ideally there should be an extension implementing something like DATALINK (SQL99), with external storage. I wonder if an extension could provide custom WAL records replicating content changes to the external storage of a standby. That would be awesom

Re: [GENERAL] count(*) in binary mode returns 0

2016-12-05 Thread Daniel Verite
elect pg_typeof(count(1)); pg_typeof --- bigint (1 row) Can you check if your code does work when the query is simply SELECT 1::bigint ? Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsql-general mailing list

Re: [HACKERS] [GENERAL] Select works only when connected from login postgres

2016-12-07 Thread Daniel Verite
term command/mode that provides a more sophisticated screen emulation into which paging seems to work exactly like in a normal terminal and the emacs key bindings are turned off. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
any port to pg_restore and it just seems to be fine. Even this seems to working (the copy from stdin is displayed on the screen): postgres@pgbox:/home/postgres/ [PG961] pg_restore -h localhost -p === -F d -C /var/tmp/exp/ Thanks Daniel

Re: [GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
It does Sent from my Phone > On 21 Dec 2016, at 18:40, Andreas Kretschmer wrote: > > > >> Am 21.12.2016 um 18:22 schrieb Daniel Westermann: >> >> >> Now I try to import into 9.6.1 => the instance is not running but the >> environment is set:

Re: [GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
ingful message at least: postgres@pgbox:/home/postgres/ [PG961] pg_restore -h localhost -p === -d postgres -F d -C /var/tmp/exp/ pg_restore: [archiver (db)] connection to database "postgres" failed: invalid port number: "===" Maybe it is only me, but this is not consistent behavior, is it? Regards Daniel

Re: [GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
store to connect to some >database, >whereas there's no big deal with psql connecting to a default >database. Ok, makes sense. Thanks all for your answers Regards Daniel

  1   2   3   4   5   6   7   8   >