Re: [SQL] DISTINCT ON not working... RESOLVED

2007-02-22 Thread Phillip Smith
This has been resolved -- although I still think it may be a bug in Postgres. I'm confused as hell, it's Friday, and it's hot though... So I'll have to think about it over the weekend and let you know if I can make sense of it. Thanks all for your suggestions. Cheers, ~p -Original Message-

Re: [SQL] pg_dump fails (timestamp out of range)

2007-02-22 Thread Tom Lane
T E Schmitz <[EMAIL PROTECTED]> writes: > However, I am stalled because pg_dump fails with the following error: > pg_dump: ERROR: timestamp out of range > pg_dump: SQL command to dump the contents of table "server_hit_bin" > failed: PQendcopy() failed. You should treat this as a corrupt-data exe

Re: [SQL] How compare current_setting(..) ?

2007-02-22 Thread Sabin Coanda
Sorry, it was my fault. The setting was '%t' and a space. I fixed it and it works well. Many thanks ! "Michael Fuhr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, Feb 22, 2007 at 12:25:42PM +0200, Sabin Coanda wrote: >> I'd like to check that my log_line_prefix is set to

Re: [SQL] how to generate a list of distinct scalar values from a column which type is array

2007-02-22 Thread A. Kretschmer
am Thu, dem 22.02.2007, um 14:25:36 +0100 mailte A. Kretschmer folgendes: > test=*# select * from a; > c > - > {aaa,bb,c} > {,} > {aaa,} > (3 rows) > > > test=*# select distinct c[s] from a, generate_series(1,3)s where c[s] is not > null; > c > -- > aaa

Re: [SQL] how to generate a list of distinct scalar values from a column which type is array

2007-02-22 Thread A. Kretschmer
am Wed, dem 21.02.2007, um 19:21:09 +0100 mailte Sergio Andreozzi folgendes: > Dear all, > > given a column which type is for instance varchar(20)[], is there any SQL > command that let me generate the list of distinct scalar values? > > > e.g.: > col1 > row 1: (aaa, bb, c) > row 2

Re: [SQL] how to generate a list of distinct scalar values from a column which type is array

2007-02-22 Thread A. Kretschmer
am Wed, dem 21.02.2007, um 19:21:09 +0100 mailte Sergio Andreozzi folgendes: > Dear all, > > given a column which type is for instance varchar(20)[], is there any SQL > command that let me generate the list of distinct scalar values? > > > e.g.: > col1 > row 1: (aaa, bb, c) > row 2

[SQL] pg_dump fails (timestamp out of range)

2007-02-22 Thread T E Schmitz
Apologies for cross-posting (already sent to pgadmin-support) but I am totally stuck with this: I run an ecommerce system on a webserver, which I want to move to a different machine. However, I am stalled because pg_dump fail

Re: [SQL] [GENERAL] Esay question, about the numeric format

2007-02-22 Thread A. Kretschmer
am Thu, dem 22.02.2007, um 12:20:12 +0100 mailte Rafa Comino folgendes: > Hi every body > I have this query > SELECT 20.00::numeric(38,2) > and postgre gives me 20, i need that postgre gives me 20.00 Works for me: (version 8.1) test=*# SELECT 20.00::numeric(38,2); numeric - 20.00 (1

Re: [SQL] How compare current_setting(..) ?

2007-02-22 Thread Michael Fuhr
On Thu, Feb 22, 2007 at 12:25:42PM +0200, Sabin Coanda wrote: > I'd like to check that my log_line_prefix is set to '%t'. > I suppose I can check it with the following statement: > SELECT current_setting( 'log_line_prefix' ) > WHERE current_setting( 'log_line_prefix' ) != '%t' > > But it r

[SQL] How compare current_setting(..) ?

2007-02-22 Thread Sabin Coanda
Hi there, I'd like to check that my log_line_prefix is set to '%t'. I suppose I can check it with the following statement: SELECT current_setting( 'log_line_prefix' ) WHERE current_setting( 'log_line_prefix' ) != '%t' But it returns every time a row, with '%t', even when log_line_prefix i