Re: [GENERAL] Losing records when server hang

2004-08-08 Thread Scott Marlowe
On Sun, 2004-08-08 at 21:26, Alvaro Herrera Munoz wrote: > On Sun, Aug 08, 2004 at 08:36:36PM -0600, Scott Marlowe wrote: > > On Sun, 2004-08-08 at 19:43, lec wrote: > > > > If I commit the following records 1,2,3,4,5,6,7,8,9,10 to the database > > > and the server hangs, I could lose records 5,6

Re: [GENERAL] COPY, \copy with defaults

2004-08-08 Thread CSN
--- Tom Lane <[EMAIL PROTECTED]> wrote: > CSN <[EMAIL PROTECTED]> writes: > > I guess this is a feature request since I can't > figure > > out a way to do it directly in postgresql (plus > > COPY/\copy isn't in SQL specs). > > You do know that COPY uses the column defaults for > all columns not >

Re: [GENERAL] COPY, \copy with defaults

2004-08-08 Thread Tom Lane
CSN <[EMAIL PROTECTED]> writes: > I guess this is a feature request since I can't figure > out a way to do it directly in postgresql (plus > COPY/\copy isn't in SQL specs). You do know that COPY uses the column defaults for all columns not listed in the input list? regards

[GENERAL] PostgreSQL 8.0 Feature List?

2004-08-08 Thread CSN
Looking forward to PostgreSQL 8.0 :). Is there an "official" feature list? What I've dug up so far: nested transactions transaction checkpoints point in time recovery tablespaces native Windows port plpgsql exceptions integrated pg_autovacuum ARC buffer code? Thanks, CSN

[GENERAL] COPY, \copy with defaults

2004-08-08 Thread CSN
I guess this is a feature request since I can't figure out a way to do it directly in postgresql (plus COPY/\copy isn't in SQL specs). Often when I import data I need to assign foreign key id's, timestamps, etc. How about a syntax something like: \copy tablename (col1, col2, col3, fkid=8, ts1='200

Re: [GENERAL] PostgreSQL 7.4.2 allows foreign key violation

2004-08-08 Thread Jan Wieck
On 8/6/2004 1:23 PM, Tom Lane wrote: Stephan Szabo <[EMAIL PROTECTED]> writes: On Fri, 6 Aug 2004, Tom Lane wrote: Already does what? I see nothing in there that would override either triggers or rules... It's not for overriding the triggers or rules, but instead checking that the post action sta

Re: [GENERAL] Losing records when server hang

2004-08-08 Thread Alvaro Herrera Munoz
On Sun, Aug 08, 2004 at 08:36:36PM -0600, Scott Marlowe wrote: > On Sun, 2004-08-08 at 19:43, lec wrote: > > If I commit the following records 1,2,3,4,5,6,7,8,9,10 to the database > > and the server hangs, I could lose records 5,6,7,8,9 but record 10 is > > there. How is this possible and do an

Re: [GENERAL] Losing records when server hang

2004-08-08 Thread Scott Marlowe
On Sun, 2004-08-08 at 19:43, lec wrote: > Hi, > > I'm observing the following: > If I commit the following records 1,2,3,4,5,6,7,8,9,10 to the database > and the server hangs, I could lose records 5,6,7,8,9 but record 10 is > there. How is this possible and do anyone know how Postgresql > phys

[GENERAL] Losing records when server hang

2004-08-08 Thread lec
Hi, I'm observing the following: If I commit the following records 1,2,3,4,5,6,7,8,9,10 to the database and the server hangs, I could lose records 5,6,7,8,9 but record 10 is there. How is this possible and do anyone know how Postgresql physically writes the records? Thanks, thomas. ---

Re: [GENERAL] CREATE FUNCTION

2004-08-08 Thread Tom Lane
Jiri Nemec <[EMAIL PROTECTED]> writes: > CREATE FUNCTION foo(int2) > RETURNS TEXT > AS 'DECLARE ret TEXT; >begin > SELECT INTO ret CAST(name AS text) > FROM shop_goods > WHERE id = $1; > return ret; >end;' > language 'sql'; This is a plpgsql function, not a sql func

Re: [GENERAL] pg jdbc driver

2004-08-08 Thread Kris Jurka
On Sun, 8 Aug 2004, Dino Nardini wrote: > However, when I tested the same data with ColdFusion MX (built on a Java > platform), I ran into problems. The french characters were either throwing > "Invalid character..." errors, or displaying as garbage. I'm guessing that > CFMX was trying to c

Re: [GENERAL] Error >>syntax error<< at >>$1<< at character 53

2004-08-08 Thread Tom Lane
Thiemo Kellner <[EMAIL PROTECTED]> writes: > I try to code a PL/pgSQL function, but always get to an execution error, I = > am=20 > unable to solve: > create or replace function GET_SUMMARY() returns integer as ' >declare > STR_SOURCE_NAME constant pg_catalog.pg_views.viewname%ty

[GENERAL] How copy a new line char to a file?

2004-08-08 Thread Clodoaldo Pinto Neto
Hi all, I'm trying to copy a table with a text field column containing a new line char to a file: ksDesenv=# create table page(line text) without oids; CREATE TABLE ksDesenv=# insert into page (line) values('1stline'||chr(10)||'2ndline'); INSERT 0 1 ksDesenv=# select * from page; line -

Re: [GENERAL] pg jdbc driver

2004-08-08 Thread Kris Jurka
On Sat, 7 Aug 2004, Dino Nardini wrote: > [Could the JDBC driver be causing the problems I'm seeing with my > website after moving from ColdFusion with ODBC? ] Unlikely. A common problem people find when using PostgreSQL's JDBC driver is that they have setup their database with SQL_ASCII enco

[GENERAL] pg jdbc driver

2004-08-08 Thread Dino Nardini
Hey folks, I'm currently evaluating an upgrade path from our current ColdFusion 5 / PostgreSQL setup to ColdFusion MX / PostgreSQL. In the current setup, we're using the Merant ODBC driver for postgres. I've installed Fedora Core 2 with Apache 2 and ColdFusion MX, and I grabbed the latest JDBC

[GENERAL] Error >>syntax error<< at >>$1<< at character 53

2004-08-08 Thread Thiemo Kellner
Hi, I try to code a PL/pgSQL function, but always get to an execution error, I am unable to solve: sledger=# \i fnc_summary.pgsql CREATE FUNCTION COMMENT GRANT COMMIT sledger=# select * from GET_SUMMARY(); ERROR: Error >>syntax error<< at >>$1<< at character 53 CONTEXT: PL/pgSQL function "get_

Re: [GENERAL] Is olap possible on postgresql????

2004-08-08 Thread Chris Travers
Last I checked, PostgreSQL supported most of the ANSI-99 OLAP functions with the following notable exceptions: 1) Table and row constructors 2) CUBE and ROLLUP functions Of course OLAP merely means that you are doing data mining rather than transaction processing, so it is more of an approach th

[GENERAL] constraint expression

2004-08-08 Thread Roger Niederland
Hello, I am having problems adding a simple expression to a table level constraint. Here is an example of one which postgresql 7.4.3 does not accept. create table test (a int, b int, c int, constraint aname check (((a=0) and (b is not null)) or ((a=1) and (c is not null))); Should this work? I

Re: [GENERAL] Postgres and Tools Intro?

2004-08-08 Thread Randy Yates
Hi Jeff, THANKS for the pointers - much appreciated! --Randy Jeff Eckermann <[EMAIL PROTECTED]> writes: > --- Randy Yates <[EMAIL PROTECTED]> wrote: > >> Hi Richard, >> >> Thanks for writing. Basically I'd like to know what >> the core >> applications/tools are and what some of the other >> mo

Re: [GENERAL] CREATE FUNCTION

2004-08-08 Thread gnari
[ CC'd to "Jiri Nemec" <[EMAIL PROTECTED]>] "Jiri Nemec" <[EMAIL PROTECTED]> said: > Hello all, sorry about beginner question, but I'm sure function has > correct structure, buw PostgreSQL reports error. (This function is > only on approbation.) > > CREATE FUNCTION foo(int2) > RETURNS TEXT > AS

[GENERAL] tracking down foreign key constraint violation error

2004-08-08 Thread Robert Fitzpatrick
I have a function that does varous things, I can post it if necessary. Basically, it deletes any related similar_group_id in tblhud74b, sets sort_order field in tblhudunits to NULL and then proceeds to re-populate tblhud74b based on certain calculations. The function runs fine through all loops to

[GENERAL] CREATE FUNCTION

2004-08-08 Thread Jiri Nemec
Hello all, sorry about beginner question, but I'm sure function has correct structure, buw PostgreSQL reports error. (This function is only on approbation.) CREATE FUNCTION foo(int2) RETURNS TEXT AS 'DECLARE ret TEXT; begin SELECT INTO ret CAST(name AS text) FROM shop_goods WH

Re: [GENERAL] Out of swap space & memory

2004-08-08 Thread Pierre-Frédéric Caillaud
catalog_type varchar(100), pushed int, delivered int, clicks int, opened int, month varchar(100), type1 int, type2 int, type3 int, type4 int, type5 int); You could use the TEXT type (see postgresql doc). ---(end of broadcast)--- TIP 6: Have you

[GENERAL] MySQL Conversion

2004-08-08 Thread Özgür Çetiner
Dear Sir / Madam,   I would like to convert our database from MySQL to PostgreSQL.We found this article :   http://pgadmin.postgresql.org/pgadmin2/pgadmin2.php?ContentID=15   The title says "How do I... Convert MS Access, MySQL or other databases?" but we can not convert our MySQL database.W

Re: [GENERAL] COPY not handling BLOBs

2004-08-08 Thread Doug McNaught
Jan Wieck <[EMAIL PROTECTED]> writes: > On 8/4/2004 1:58 PM, David Rysdam wrote: > >> bytea will only go up to "several thousand bytes" according to the >> docs. I assume it's not very precise because the maximum is 8196 - >> $other_fields_in_row. My binary data could be a couple times that >> o