[GENERAL] text column constraint, newbie question

2009-03-22 Thread RebeccaJ
Hi, I'm new to both PostgreSQL and web-based application development; I read the FAQ at postgresql.org (perhaps this discussion group has another FAQ that I haven't found yet?) and didn't see this addressed. I'm creating a table with a column of type text, to be used in a php web application,

Re: [GENERAL] (odbc) multiple step ole db generated error - date/timestamp column

2009-03-22 Thread Craig Ringer
zach cruise wrote: when importing from oracle 10g Importing how? CSV dump and load? DB link of some sort? Operating system and version? Oracle version? i get multiple step ole db generated error. From what program ? Where? -- Craig Ringer -- Sent via pgsql-general mailing list

Re: [GENERAL] text column constraint, newbie question

2009-03-22 Thread Scott Marlowe
On Sat, Mar 21, 2009 at 11:13 PM, RebeccaJ rebec...@gmail.com wrote: Hi, I'm new to both PostgreSQL and web-based application development; I read the FAQ at postgresql.org (perhaps this discussion group has another FAQ that I haven't found yet?) and didn't see this addressed. I'm creating a

Re: [GENERAL] Breaking national language support in Solaris 8

2009-03-22 Thread Gregory Stark
Peter Eisentraut pete...@gmx.net writes: This will, however, only work with GNU Gettext (as used in Linux and BSD distributions) and Solaris 9 or later, and it is not easy to provide a backward compatible mode. Eh? I thought it was trivial to provide a backward compatible mode which is

Re: [GENERAL] What are the benefits of using a clustered index?

2009-03-22 Thread Gregory Stark
Simon Riggs si...@2ndquadrant.com writes: Just think one index tuple points to more than one heap row. Could you expand on that? Like, uh, I have no idea what you're saying. Less index pointers, smaller index. Are you talking about Heikkie's grouped-items-index? The trick is: How? But

Re: [GENERAL] Breaking national language support in Solaris 8

2009-03-22 Thread Peter Eisentraut
On Sunday 22 March 2009 13:03:29 Gregory Stark wrote: Peter Eisentraut pete...@gmx.net writes: This will, however, only work with GNU Gettext (as used in Linux and BSD distributions) and Solaris 9 or later, and it is not easy to provide a backward compatible mode. Eh? I thought it was

Re: [GENERAL] (odbc) multiple step ole db generated error - date/timestamp column

2009-03-22 Thread zach cruise
On Sun, Mar 22, 2009 at 3:39 AM, Craig Ringer cr...@postnewspapers.com.au wrote: zach cruise wrote: when importing from oracle 10g Importing how? CSV dump and load? DB link of some sort? odbc (see email) specifically Microsoft OLE DB Provider for Oracle Operating system and version? Oracle

Re: [GENERAL] Srf function : missing library on PostgreSQL 8.3.6 on Windows?

2009-03-22 Thread Ben Ali Rachid
Craig Ringer wrote : If you're using C++ you must also: - Ensure that no exceptions propagate outside your code - Declare all hook functions that might be dlopen()ed as extern C Thanks for your advices but I'm not sure to have understood. For example, when I try to implement the normal_rand

Re: [GENERAL] Srf function : missing library on PostgreSQL 8.3.6 on Windows?

2009-03-22 Thread Tom Lane
Ben Ali Rachid souliman...@yahoo.fr writes: Craig Ringer wrote : - Declare all hook functions that might be dlopen()ed as extern C Thanks for your advices but I'm not sure to have understood. PG_FUNCTION_INFO_V1() generates a function that has to have C linkage. So does PG_MODULE_MAGIC. I'm

Re: [GENERAL] Srf function : missing library on PostgreSQL 8.3.6 on Windows?

2009-03-22 Thread Ben Ali Rachid
Tom Lane wrote : PG_FUNCTION_INFO_V1() generates a function that has to have C linkage. So does PG_MODULE_MAGIC.  I'm actually not sure how you got the module to load at all with the latter point ... Sorry, I forgot this in my previous post : #ifdef __cplusplus extern C { #endif -- #ifdef

Re: [GENERAL] text column constraint, newbie question

2009-03-22 Thread RebeccaJ
Are there characters, maybe non-printing characters, or perhaps even whole phrases, that could cause problems in my database or application if I were to allow users to enter them into that column? If so, does anyone happen to have a regular expression handy that you think is a good

[GENERAL] Understanding Execution Plans

2009-03-22 Thread Oliver Weichhold
I'm in the process of migrating a web application from a dedicated server to VPS Hosting (Slicehost). During the test phase I've spotted a huge performance advantage for the old dedicated server for some queries and I need some help interpreting the execution plans. Plan 1 - Dedicated Server

Re: [GENERAL] Srf function : missing library on PostgreSQL 8.3.6 on Windows?

2009-03-22 Thread Tom Lane
Ben Ali Rachid souliman...@yahoo.fr writes: I have no problem when I load the DLL (no 'missing magic block' error). The server crashes when I try : SELECT normal_rand(5, 10.0, 20.0) or SELECT * FROM normal_rand(5, 10.0, 20.0). Well, the next step would be to get out your debugger and try to

Re: [GENERAL] Understanding Execution Plans

2009-03-22 Thread Tom Lane
Oliver Weichhold oli...@weichhold.com writes: It seems that especially the joins take extremely long on the VPS versus the dedicated machine but I'm not sure if that's caused by the the fact that the dedicated machine has 8x the amount of RAM and thus can cache much more data or because it has

Re: [GENERAL] text column constraint, newbie question

2009-03-22 Thread Scott Marlowe
On Sun, Mar 22, 2009 at 11:36 AM, RebeccaJ rebec...@gmail.com wrote:  Are there characters, maybe non-printing characters, or perhaps even whole phrases, that could cause problems in my database or application if I were to allow users to enter them into that column? If so, does anyone

[GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2009-03-22 Thread M L
Hi there, i'm new to postgres. I want to create view when adding new row. So what i've got: CREATE OR REPLACE FUNCTION add_view() RETURNS trigger AS $$ DECLARE someint integer; BEGIN RAISE NOTICE 'dodajesz nowa lige %', NEW.id; someint := NEW.id; RAISE NOTICE 'dodajesz nowa lige %',

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2009-03-22 Thread Craig Ringer
M L wrote: CREATE TRIGGER league AFTER insert ON t_leagues FOR STATEMENT EXECUTE PROCEDURE add_view(); Then in psql I made an query and got error: league=# INSERT INTO t_leagues (name) VALUES('3liga'); ERROR: record new is not assigned yet DETAIL: The tuple structure of a

[GENERAL] bash postgres

2009-03-22 Thread Greenhorn
Hi, I'm trying to pass variables on a bash script embedded with psql commands. cat header.txt to1,from1,subject1 to2,from2,subject2 to3,from3,subject3 to4,from4,subject4 cat b.sh #!/bin/bash two=2 psql -h localhost -U postgres -d mobile -c create temp table header ( field_1 textnot

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2009-03-22 Thread M L
2009/3/23 Craig Ringer cr...@postnewspapers.com.au M L wrote: CREATE TRIGGER league AFTER insert ON t_leagues FOR STATEMENT EXECUTE PROCEDURE add_view(); Then in psql I made an query and got error: league=# INSERT INTO t_leagues (name) VALUES('3liga'); ERROR: record new is not

[GENERAL] Time intersect query

2009-03-22 Thread Brad Murray
I'm wanting to optimize and improve a query to get the maximum number of users over a period of time. What I'm trying to accomplish is to get graphable data points of the maximum number of simultaneous users at a specified interval over a period of time, preferably with only a single pass through

Re: [GENERAL] bash postgres

2009-03-22 Thread Harvey, Allan AC
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org]on Behalf Of Greenhorn Sent: Monday, 23 March 2009 3:03 PM To: pgsql-general@postgresql.org; pgsql-...@postgresql.org Subject: [GENERAL] bash postgres Hi, I'm trying to

[GENERAL] pg_restore error - Any Idea?

2009-03-22 Thread DM
Hi All, I am facing an error on executing the below command dump name: pg_dump_FcZ0.pnps_200903041201_1.2.1.0_base_testing databae name: pnqd_test $pg_restore -U postgres -p 5433 -d pnqd_test pg_dump_FcZ0.pnps_200903041201_1.2.1.0_base_testing pg_restore: [archiver (db)] Error while PROCESSING