[GENERAL] cast question: max double precision > text > double precision fails with out or range error

2011-01-07 Thread Maciej Sakrejda
postgres=# select (((1.7976931348623157081e+308)::double precision)::text)::double precision; ERROR: "1.79769313486232e+308" is out of range for type double precision I can't think of too many practical use cases here, but I'm working on a pg driver and in my float data decoder functional tests,

Re: [GENERAL] Realtime Query Dashboard Results

2011-01-07 Thread Oliver Kohll - Mailing Lists
On 7 Jan 2011, at 22:02, "THOMPSON, JARED (ATTBAPCO)" wrote: > I assume when people use dashboards they are not being queried every > second for updating but maybe every minute? > > Are there any tools that work good on top of postgres? > > (I see in the stock market (though I am looking at/for

Re: [GENERAL] Realtime Query Dashboard Results

2011-01-07 Thread Andy Colson
On 1/7/2011 1:52 PM, THOMPSON, JARED (ATTBAPCO) wrote: Just looking for understanding/ideas. I assume when people use dashboards they are not being queried every second for updating but maybe every minute? Are there any tools that work good on top of postgres? (I see in the stock market (thoug

[GENERAL] Realtime Query Dashboard Results

2011-01-07 Thread THOMPSON, JARED (ATTBAPCO)
Just looking for understanding/ideas. I assume when people use dashboards they are not being queried every second for updating but maybe every minute? Are there any tools that work good on top of postgres? (I see in the stock market (though I am looking at/for production data) they seem to

[GENERAL] Remote Connection

2011-01-07 Thread Bob Pawley
Hi I am attempting to connect from two local interfaces to a remote database. With one interface (SharpMap developed in C#) I have no problems. With the other interface (Delphi) I have no problem connecting in design mode. However when I compile Delphi it just hangs, until timeout, without ope

Re: [GENERAL] Backup and restore sequences

2011-01-07 Thread Adrian Klaver
On 01/07/2011 08:26 AM, gvim wrote: On 07/01/2011 15:58, Adrian Klaver wrote: Details below. When you dump a specific table using -t it will not automatically dump dependent objects. -t can be used to dump a sequence because they are just a special type of table. From: http://www.postgresql.or

Re: [GENERAL] OOO and postgres

2011-01-07 Thread Adrian Klaver
On 01/07/2011 10:16 AM, Bernhard Rohrer wrote: What I am not getting is - as far as I can see none of the fields _is_ an array! So why would this error message appear?ion The "type" field is an array type because of the square brackets after the data type. "type" character varying[] NOT NULL

Re: [GENERAL] OOO and postgres

2011-01-07 Thread Bernhard Rohrer
What I am not getting is - as far as I can see none of the fields _is_ an array! So why would this error message appear? On 07/01/11 17:40, Bernhard Rohrer wrote: Hi guys I am using the postgres driver for OOO and just ran into the following error: Error code: 1 pq_driver: [PGRES_FATAL_ERR

Re: [GENERAL] OOO and postgres

2011-01-07 Thread Thomas Kellerer
Rich Shepard wrote on 07.01.2011 18:56: The data type is VARCHAR(), not character varying[]. character varying is a synonym for varchar, so the definition character varying[] is valid. It defines an array of varchar and is equivalent to varchar[] But I doubt that this is what the OP meant ;)

Re: [GENERAL] OOO and postgres

2011-01-07 Thread Susan Cassidy
Per the error message, you need to enclose array values in braces. For example, something like: INSERT into "Bladetypes" ("ID", "type"), values ('1', '{"Knife"}'); -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Bernha

Re: [GENERAL] OOO and postgres

2011-01-07 Thread Rich Shepard
On Fri, 7 Jan 2011, Bernhard Rohrer wrote: CREATE TABLE "Bladetypes" ( "ID" integer NOT NULL, "type" character varying[] NOT NULL, CONSTRAINT "Bladetypes_pkey" PRIMARY KEY ("ID") ) ALTER TABLE "Bladetypes" ADD COLUMN "ID" integer; ALTER TABLE "Bladetypes" ALTER COLUMN "ID" SET NOT NULL; ALT

Re: [GENERAL] OOO and postgres

2011-01-07 Thread Adrian Klaver
On 01/07/2011 09:40 AM, Bernhard Rohrer wrote: Hi guys I am using the postgres driver for OOO and just ran into the following error: Error code: 1 If you are referring to OpenOffice and the native SDBC driver then from the docs: http://dba.openoffice.org/drivers/postgresql/index.html#fea

[GENERAL] OOO and postgres

2011-01-07 Thread Bernhard Rohrer
Hi guys I am using the postgres driver for OOO and just ran into the following error: Error code: 1 pq_driver: [PGRES_FATAL_ERROR]ERROR: array value must start with "{" or dimension information LINE 1: ...O "public"."Bladetypes" ( "ID","type") VALUES ( '1','Knife')

Re: [GENERAL] Backup and restore sequences

2011-01-07 Thread Alan Hodgson
On January 7, 2011, gvim wrote: > PostgreSQL 9.0.1/pgAdminIII 1.12.1 > > I want to copy selected tables from one database to another and maintain > the sequences which I originally setup with: > > CREATE SEQUENCE venues_id_seq START WITH 1122; > ALTER TABLE venues ALTER COLUMN id SET DEFAULT nex

Re: [GENERAL] Backup and restore sequences

2011-01-07 Thread Adrian Klaver
On Friday 07 January 2011 7:46:31 am gvim wrote: > PostgreSQL 9.0.1/pgAdminIII 1.12.1 > > I want to copy selected tables from one database to another and maintain > the sequences which I originally setup with: > > CREATE SEQUENCE venues_id_seq START WITH 1122; > ALTER TABLE venues ALTER COLUMN id S

[GENERAL] Backup and restore sequences

2011-01-07 Thread gvim
PostgreSQL 9.0.1/pgAdminIII 1.12.1 I want to copy selected tables from one database to another and maintain the sequences which I originally setup with: CREATE SEQUENCE venues_id_seq START WITH 1122; ALTER TABLE venues ALTER COLUMN id SET DEFAULT nextval('venues_id_seq'); ... along with their

Re: [GENERAL] Inserting data from one database to another using stored functions

2011-01-07 Thread Richard Huxton
On 07/01/11 01:56, Benjie Buluran wrote: Hi pgSQL peeps! I’m stumped on this question for over 3 days now. PERFORM dblink_exec('SELECT sp_insert_detailtable('|| pActivityId ||', '|| pserialnumber ||')'); I’m using the DEBUG function in pgAdmin, and I keep getting the “*statement returning

Re: [GENERAL] Query to find sum of grouped counts from 2 tables

2011-01-07 Thread Thomas Kellerer
Satish Burnwal (sburnwal) wrote on 07.01.2011 11:15: I have 2 tables containing the data for same items: STORE1 - Id typeitems - 1 FOOD10 2 FOOD15 3 SOAP20 STORE2 -

[GENERAL] Query to find sum of grouped counts from 2 tables

2011-01-07 Thread Satish Burnwal (sburnwal)
I have 2 tables containing the data for same items: STORE1 - Id typeitems - 1 FOOD10 2 FOOD15 3 SOAP20 STORE2 - Id typeitems

Re: [GENERAL] Inserting data from one database to another using stored functions

2011-01-07 Thread Benjie Buluran
Hi Eric, I have tested your reply and it works J! Thank you for your help! By the way, here's what I did with the calling stored function ("sf DBa"): CREATE OR REPLACE FUNCTION sp_update_serialnumber(pserialnumber character varying, pActivityId integer) RETURNS void AS $BODY$ DECL

Re: [GENERAL] Inserting data from one database to another using stored functions

2011-01-07 Thread Eric McKeeth
On Thu, Jan 6, 2011 at 6:56 PM, Benjie Buluran < benjie.bulu...@igentechnologies.com> wrote: > Hi pgSQL peeps! > > > > I’m stumped on this question for over 3 days now. > > > > I need to run a stored function in Database A (“sf DBa”) which calls a > stored function in Database B (“sf DBb”). > > >