[SQL] using pg as a db backend in Access

2001-01-15 Thread Markus Wagner
Hi, I recently posted a problem with connecting to a pg db server from access. Now I found that the pg/odbc driver under windows lets choose between three protocols, 6.x, 6.y, 6.z. I am using pg 7.x as the db server. Could this be the problem? I managed to get the tables linked and shown, but

[SQL] improve performance

2001-01-15 Thread Alexaki Sofia
Hello, A) I am going to load a huge amount of data in the DBMS using JDBC and I want to reduce as much as possible the required loading time. Initially I loaded all data in one transaction. Subsequently, I increased the number of buffers and disabled fsync() (-o -F) and I loaded the data

[SQL] Querying date interval

2001-01-15 Thread Renato De Giovanni
Hi, Is there any SQL workaround to get the right results from the select statement bellow? Or am I doing something wrong?? create table testdate (field1 date); insert into testdate values ('2000-09-30'); insert into testdate values ('2000-10-20'); insert into testdate values ('2000-11-25');

[SQL] Re: Querying date interval

2001-01-15 Thread J.H.M. Dassen (Ray)
On Mon, Jan 15, 2001 at 12:19:56 -0200, Renato De Giovanni wrote: select * from testdate where field1 between '2000-10-01' and '2000-11-30' ; field1 2000-09-30 why is it here?? 2000-10-20 2000-11-25 It works fine for me (7.0.3, Debian GNU/Linux "unstable"). I

Re: [SQL] Querying date interval

2001-01-15 Thread Tom Lane
Renato De Giovanni [EMAIL PROTECTED] writes: create table testdate (field1 date); insert into testdate values ('2000-09-30'); insert into testdate values ('2000-10-20'); insert into testdate values ('2000-11-25'); select * from testdate where field1 between '2000-10-01' and '2000-11-30' ;

Re: [SQL] improve performance

2001-01-15 Thread Tom Lane
Alexaki Sofia [EMAIL PROTECTED] writes: Initially I loaded all data in one transaction. Subsequently, I increased the number of buffers and disabled fsync() (-o -F) and I loaded the data again but the performance was almost unchanged. Does it make sense?? How can I improve performance? To

Re: [SQL] Querying date interval

2001-01-15 Thread Richard Huxton
- Original Message - From: "Renato De Giovanni" [EMAIL PROTECTED] Hi, Is there any SQL workaround to get the right results from the select statement bellow? Or am I doing something wrong?? select * from testdate where field1 between '2000-10-01' and '2000-11-30' ; field1

[SQL] How to display a unixtimestamp from a timestamp record?

2001-01-15 Thread Marcelo Bartsch
Hello! again i was faced to a problem i was trying to do create view in wich i had the next fields: CREATE TABLE "tbacct" ( "user_name" character varying(32), "nas_identifier" character varying(15), "nas_port" int4, "acct_session_id" character varying(15),

Re: [SQL] How to display a unixtimestamp from a timestamp record?

2001-01-15 Thread Stephan Szabo
select user_name, date_part( 'epoch' , timestamp 'acct_timestamp') from tbacct limit 2; it said ERROR: Bad timestamp external representation 'acct_timestamp' how should i represent date_part( 'epoch' , timestamp 'acct_timestamp') to work? select user_name, date_part ('epoch',

[SQL] Sort by relevance

2001-01-15 Thread Chad McKay
Hello,I am trying to use a perl script to break an input string into keywords andpull out all the records that match any of them:my (@chips)= split(' ', $f_name);foreach my $chip (@chips) { next if ($stoppers=~/ $chip / || length($chip) 3); if ($query) {$query .= " OR name ~* '.*$chip.*'

[SQL] Adding a parameter to a trigger

2001-01-15 Thread Joern Muehlencord
Hi together, I am still trying to implement my "userlog". At the moment I can insert a message like "User xy added". What I want to have is, that I can insert something like "User xy added by z". Can anyone tell me, how to parse a parameter to the trigger (I think, only the application knows

[SQL] Weird script problems solved...

2001-01-15 Thread jkakar
Hi, About a week back I'd posted a message asking for help with a script that as far as I could tell was well formed. The problem was with 2 INSERT statements directly after the CREATE TABLE statement of the table that I was trying to insert data into. I'd used C single/multi line comments of

[SQL] Re: [INTERFACES] outer join in PostgreSql

2001-01-15 Thread Peter Eisentraut
Mauricio Hipp Werner writes: I need help, which is the symbol used in postgreSql to carry out the outer join. in oracle the is used (+) in sybase the is used * and in postgreSql? No symbol, just words. http://www.postgresql.org/devel-corner/docs/postgres/sql-select.htm -- Peter

Re: [SQL] pg_dump error

2001-01-15 Thread Philip Warner
At 22:13 15/01/01 +0200, Johann Spies wrote: Can not create pgdump_oid table. Explanation from backend: 'ERROR: cannot create pgdump_oid Is there a way to repair this? If there was an earlier crash while running pg_dump, the table may already exist. If so, try deleting it. Also, can you

Re: [SQL] Querying date interval

2001-01-15 Thread Renato De Giovanni
create table testdate (field1 date); insert into testdate values ('2000-09-30'); insert into testdate values ('2000-10-20'); insert into testdate values ('2000-11-25'); select * from testdate where field1 between '2000-10-01' and '2000-11-30' ; field1

Re: [SQL] pg_dump error

2001-01-15 Thread Tatsuo Ishii
Can not create pgdump_oid table. Explanation from backend: 'ERROR: cannot create pgdump_oid Is there a way to repair this? If there was an earlier crash while running pg_dump, the table may already exist. If so, try deleting it. Also, can you confirm that the username under which you

Re: [SQL] pg_dump error

2001-01-15 Thread Tom Lane
Tatsuo Ishii [EMAIL PROTECTED] writes: Can not create pgdump_oid table. Explanation from backend: 'ERROR: cannot create pgdump_oid Is there a way to repair this? I would guess that this means there is a file named "pgdump_oid" hanging around in the database directory, no doubt leftover

[SQL] Three questions regarding PL/PGSQL

2001-01-15 Thread Josh Berkus
Folks, 1. While I am able to use the %TYPE declaration within PL/PGSQL functions, I am unable to use this declaration in the parameters for the function -- I get 'Parse Error at or near "."' 2. When I have a PL/PGSQL function return a custom message using a VARCHAR return value, I get

[SQL] Question #4 about PL/PGSQL

2001-01-15 Thread Josh Berkus
Folks, Oh, yes, one more: 4. If I pass a NULL to any of the parameters of a PL/PGSQL function, any (other) VARCHAR parameters are set to NULL as well. Thanks! -Josh

Re: [SQL] Question #4 about PL/PGSQL

2001-01-15 Thread Tom Lane
"Josh Berkus" [EMAIL PROTECTED] writes: 4. If I pass a NULL to any of the parameters of a PL/PGSQL function, any (other) VARCHAR parameters are set to NULL as well. Not only varchar --- any other parameters, period. And not only that, but the result is taken as NULL no matter what you try

Re: [SQL] Question #4 about PL/PGSQL

2001-01-15 Thread Josh Berkus
Tom, Not only varchar --- any other parameters, period. And not only that, but the result is taken as NULL no matter what you try to return. Not quite. I tried the following: Parameters: $1=integer, $2=NULL, $3=varchar And I had the function test for nulls. It read the first parameter,

Re: [SQL] Question #4 about PL/PGSQL

2001-01-15 Thread Josh Berkus
Tom, Damn! When is the "holy grail" of PostgreSQL going to be stable enough to use? Beta3 still has a "not advisable for production" warning, and I'm being tied up in knots by the number of things I need in 7.1. Ooops! That may have sounded a little harsh. I am a bit desperate, but