[GENERAL] Problem in creating a table

2005-05-16 Thread Wen Guangcheng
Hi Gurus, (B (BWhen I try to create a table by a script I get a error as follows, (B# (B[EMAIL PROTECTED] pgsql]$ psql -d postgres -e -f (B/opt/rapisa/sql/TD_ACCESSCOUNT.sql (B (BCREATE TABLE TD_ACCESSCOUNT( (BAC_YEAR NUMBER(4,0)

[GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

2005-05-16 Thread MLikharev
Hi, I was asking this question some time ago and was under impression that this will be fixed in 8.x. In general problem is, CREATE TEMP TABLE AS SELECT does not report any rows to the engine, seems like, so GET DIAGNOSTICS ROW_COUNT after the statement returns 0 as well as FOUND false. This was

Re: [GENERAL] Relation between pgsql_tmp and work_mem

2005-05-16 Thread Bruce Momjian
Himanshu Baweja wrote: > I read somewhere in the archives we can set work_mem > to the largest size of tmp file created in the > pgsql_tmp folder > but how can i make those files in pgsql_tmp not be > deleted after use... so that i can get the file > listing for all files created during the run

Re: [GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-16 Thread Scott Marlowe
On Mon, 2005-05-16 at 15:05, Adam Witney wrote: > On 16/5/05 8:17 pm, "Scott Marlowe" <[EMAIL PROTECTED]> wrote: > > > On Mon, 2005-05-16 at 07:35, Adam Witney wrote: > >> Hi, > >> > >> I have a web application (PHP) which runs on its own box, and connects to a > >> database on a second box. The

Re: [GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-16 Thread Adam Witney
On 16/5/05 8:17 pm, "Scott Marlowe" <[EMAIL PROTECTED]> wrote: > On Mon, 2005-05-16 at 07:35, Adam Witney wrote: >> Hi, >> >> I have a web application (PHP) which runs on its own box, and connects to a >> database on a second box. The database box is behind the firewall and only >> accepts connec

Re: [GENERAL] is in postgres solution

2005-05-16 Thread Ragnar Hafstað
On Mon, 2005-05-16 at 11:43 +0300, Margus Roo wrote: > Hello. > I have 2 variables type timestamp. Example date1 = 2005-01-01 23:00 and > date2 = 2005-05-04 12:00. I want get something like age(date2,date1) but > ouput format must by hours::minutes. get the difference in minutes with: extract(

Re: [GENERAL] is in postgres solution

2005-05-16 Thread Bruno Wolff III
On Mon, May 16, 2005 at 11:43:09 +0300, Margus Roo <[EMAIL PROTECTED]> wrote: > Hello. > I have 2 variables type timestamp. Example date1 = 2005-01-01 23:00 and > date2 = 2005-05-04 12:00. I want get something like age(date2,date1) but > ouput format must by hours::minutes. > > Is that bossibl

Re: [GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-16 Thread Scott Marlowe
On Mon, 2005-05-16 at 07:35, Adam Witney wrote: > Hi, > > I have a web application (PHP) which runs on its own box, and connects to a > database on a second box. The database box is behind the firewall and only > accepts connections from the web server. > > I have set up stunnel on the web server

Re: [GENERAL] Increasing connection limit in postgres

2005-05-16 Thread Thomas F. O'Connell
There should be no need to recompile anything. See the entry for max_connections: http://www.postgresql.org/docs/8.0/static/runtime-config.html#RUNTIME- CONFIG-CONNECTION -tfo -- Thomas F. O'Connell Co-Founder, Information Architect Sitening, LLC Strategic Open Source: Open Your i™ http://www.

Re: [GENERAL] Increasing connection limit in postgres

2005-05-16 Thread Tom Lane
Akash Garg <[EMAIL PROTECTED]> writes: > How do you recompile postgres to allow more than 1024 connections? If you are using any remotely modern version of Postgres, there isn't any specific compile-time limit on that. So I think the correct answer is "upgrade". regards,

[GENERAL] Increasing connection limit in postgres

2005-05-16 Thread Akash Garg
How do you recompile postgres to allow more than 1024 connections? Thanks, Akash ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-16 Thread Adam Witney
Hi, I have a web application (PHP) which runs on its own box, and connects to a database on a second box. The database box is behind the firewall and only accepts connections from the web server. I have set up stunnel on the web server and I would like to allow some limited external direct access

Re: [GENERAL] Named Notation for Functions' Parameteres

2005-05-16 Thread Bruno Wolff III
On Sun, May 15, 2005 at 13:59:00 +0200, Samer Abukhait <[EMAIL PROTECTED]> wrote: > Does PostgreSQL support by anyhow the parameter named notation in > function calling?? (like oracle's: parameter_name => argument_value) > > If not, is it on the wish list? It is on the TODO list. -

Re: [GENERAL] Sequences question & problem

2005-05-16 Thread Michael Fuhr
On Mon, May 16, 2005 at 12:29:27PM +0200, Lada 'Ray' Lostak wrote: > > I am having small trouble with sequences. I am inserting row into table, > and I need to get value of its 'id' column (sequencen type). As far I know > it have to be done by > > SELECT last_value FORM seq_name > >

[GENERAL] is in postgres solution

2005-05-16 Thread Margus Roo
Hello. I have 2 variables type timestamp. Example date1 = 2005-01-01 23:00 and date2 = 2005-05-04 12:00. I want get something like age(date2,date1) but ouput format must by hours::minutes. Is that bossible? Reg, Margusja ---(end of broadcast)--- TI

Re: [GENERAL] Sequences question & problem

2005-05-16 Thread Lada 'Ray' Lostak
Thank you.. I didn't know about race condition.. Shame on me :) > If you're using PostgreSQL 8.0 or later then you can get the sequence > name with the pg_get_serial_sequence() function: Is there any way how to do that (or add this function) in 7.3.x ? Best regards, Lada 'Ray' Lostak Unreal64 Dev

Re: [GENERAL] connecting to server process via sockets

2005-05-16 Thread Yanni Chiu
Randall Smith wrote: > > For fun and learning, I would like to connect to the Postgresql backend > and issue queries using sockets. I'm using Python's socket module. I'm > new to socket programming, but I'm experienced with Python and > Postgresql. Look in the postgres docs for the section on f

Re: [GENERAL] connecting to server process via sockets

2005-05-16 Thread Douglas McNaught
Randall Smith <[EMAIL PROTECTED]> writes: > For fun and learning, I would like to connect to the Postgresql > backend and issue queries using sockets. I'm using Python's socket > module. I'm new to socket programming, but I'm experienced with > Python and Postgresql. I've been using the JDBC dr

Re: [GENERAL] connecting to server process via sockets

2005-05-16 Thread John DeSoi
On May 16, 2005, at 11:14 AM, Randall Smith wrote: When I run this, this is what shows up in the logs. 2005-05-16 10:11:34 [2638] LOG: connection received: host=127.0.0.1 port=42607 2005-05-16 10:11:34 [2638] LOG: invalid length of startup packet We just had a thread about this on the Novice (!

[GENERAL] connecting to server process via sockets

2005-05-16 Thread Randall Smith
For fun and learning, I would like to connect to the Postgresql backend and issue queries using sockets. I'm using Python's socket module. I'm new to socket programming, but I'm experienced with Python and Postgresql. I've been using the JDBC driver and the online documentation as a guide, b

[GENERAL] Relation between pgsql_tmp and work_mem

2005-05-16 Thread Himanshu Baweja
I read somewhere in the archives we can set work_mem to the largest size of tmp file created in the pgsql_tmp folder but how can i make those files in pgsql_tmp not be deleted after use... so that i can get the file listing for all files created during the run... currently i am doing "ls -l " s

[GENERAL] Sequences question & problem

2005-05-16 Thread Lada 'Ray' Lostak
Hi there, I am having small trouble with sequences. I am inserting row into table, and I need to get value of its 'id' column (sequencen type). As far I know it have to be done by SELECT last_value FORM seq_name (or next_val before insert). Normally, sequences are created by 't

[GENERAL] UTF-8 and LC_CTYPE locale

2005-05-16 Thread Stefan Hans
Hi *,   we are using PostgreSQL for data in different languages like English, German and French.   The encoding and locale parameters on our OS (UTF-8 and en_US.UTF-8) had problems e.g. with german umlaut.   After some tries we found encoding and locale parameters (LATIN1 and de_DE.iso88591)

Re: [GENERAL] date problem

2005-05-16 Thread tony
Le lundi 16 mai 2005 à 09:44 +0100, Richard Huxton a écrit : > > works for one record but other fields I need must be in aggregate or > > grouped. Is there a simple SQL request to get the most recent records > > from a set of joined tables? > > SELECT * FROM expo WHERE date = (SELECT max(date) FR

Re: [GENERAL] date problem

2005-05-16 Thread tony
Le lundi 16 mai 2005 à 10:30 +0200, Roman Neuhauser a écrit : > select * > from expo > where date = (select max(date) > from expo > where date < now()) as x; Thanks! I keep forgetting this for some strange reason... I was putting it in the "from" i

Re: [GENERAL] date problem

2005-05-16 Thread Richard Huxton
tony wrote: Hi, I thought this would be a classic sort of query but google did no give me the answer. I am attempting to select records where one of the dates is the latest date before today select max(date) from expo where date < now() works for one record but other fields I need must be in aggreg

Re: [GENERAL] date problem

2005-05-16 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-05-16 09:48:08 +0200: > I am attempting to select records where one of the dates is the latest > date before today > > select max(date) from expo where date < now() > > works for one record but other fields I need must be in aggregate or > grouped. Is there a simple SQL

[GENERAL] date problem

2005-05-16 Thread tony
Hi, I thought this would be a classic sort of query but google did no give me the answer. I am attempting to select records where one of the dates is the latest date before today select max(date) from expo where date < now() works for one record but other fields I need must be in aggregate or g