[HACKERS] unsubscribe

2004-04-13 Thread Jaume Teixi
unsubscribe

---(end of broadcast)---
TIP 8: explain analyze is your friend


[HACKERS] COPY as non super user

2003-01-31 Thread Jaume Teixi
how should I use  COPY arti FROM 'ARTI.txt' USING DELIMITERS '|'  as normal user ?

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] best method for select within all dimensions of an array

2002-04-08 Thread Jaume Teixi

hello

when selecting in a table with a text[]

there's an sql command for looking all dimensions of the array
something like 'where text[*]'

or only should be implemented trought a 'for (i=0; imaxDimension; i++) 

?

bests from barcelona

jaume teixi

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[ADMIN] Still some problems importing with COPY

2001-02-28 Thread Jaume Teixi

Hi,

I want to import from a .txt file, I usually use:

COPY noticies FROM '/home/teixi/_6tm_/_elbulli/premsai.txt' USING
DELIMITERS '|' \g

a) If table 'noticies' has a date row and is null on data file it claims:
Unable to import date filed ''

so how to admit date fields null?

b) When there are some 'carriage returns' on a field in the data file is
understood as a new 

|row1data1|row1data2|row1data3|^M
|row2data1^M
stillrow2data1|row2data2|row2data2|^M

is interpreted as a 3 row data file when in reallity is a 2 row data file.

how could I handle this when importing ?




bests from barcelona,
jaume teixi


ps: weather loops between 5C to 30C, crazy.



[HACKERS] Re: SOLVED: COPY doesn't works when containing ' ' or ' ' characters on db

2001-02-27 Thread Jaume Teixi

On Mon, 26 Feb 2001 22:16:35 -0500 Tom Lane [EMAIL PROTECTED] wrote:

 Jaume Teixi [EMAIL PROTECTED] writes:
  I finally percated that when data contains '' or '' it's impossible
to
  parse trought:
 
  COPY products FROM '/var/lib/postgres/dadesi.txt' USING DELIMITERS '|'
\g
 
  it causes:
 
  SELECT edicion FROM products;
   edicion 
  -
   Espaa|Nacional ---puts on the same cell either there's an '|'
in
  the middle!!!


I finally, thanks to Oliver Elphick,

managed to create database with:
CREATE DATABASE "demo" WITH ENCODING = 'SQL_ASCII'

and data was imported OK, great, thanks!




[ADMIN] Re: NOSUCCESS: m$ access - psql howto ?

2001-02-26 Thread Jaume Teixi

On Sat, 24 Feb 2001 18:48:15 -0800 "Richard T. Robino"
[EMAIL PROTECTED] wrote:
 Use binary type for transferring files via FTP.
it's the same

On Sat, 24 Feb 2001 09:27:43 +0100 Stefan Huber
[EMAIL PROTECTED] wrote:
 wild guess: maybe you must escape the pipe-symbol: ...USING DELIMITERS
'\|'
the same :(

finally I managed to export LANG=es_ES on system then on postmaster.ini I
also have LANG=es_ES but when I do:

COPY products FROM '/var/lib/postgres/dadesi.txt' USING DELIMITERS '|' \g

it causes:

SELECT edicion FROM products;
 edicion 
-
 Espaa|Nacional ---puts on the same cell either there's an '|' in
the middle!!!

SELECT protagonista FROM products;
 protagonista 
--
 Ferran Adri|Castellano ---puts on the same cell
 el Bulli taller
 ICC
 Ferran Adri|Francs|Francia ---puts on the same cell 2 '|'

Also have tried with @ or tabs as delimiters with any result at all!!

why this only occurs on some cells? what more could I check?

best regards,
jaume.




 On 2/23/01 3:04 AM, "Jaume Teixi" [EMAIL PROTECTED] wrote:
 
  Hi,
  I cannot use any kind of odbc because my customers have his local m$
  access db's locally then export them on .txt with tab or | separated,
then
  put on my server trought ftp.
  
  and is working ok except that the customers are on spanish databases
then
  a data like:
  --DATE-NAME-LANG--
  1/6/2000|Ferran Adri|Castellano|
  
  when sended trought ftp on my server is converted to:
  --DATE-NAMELANG--
  1/6/2000|Ferran Adri\xe0|Castellano|
  
  so when imported on Postgresql with:
  COPY products FROM '/var/lib/postgres/iii2.txt' USING DELIMITERS '|'
\g
  --DATE-NAME---LANG--
  1/6/2000|Ferran Adri\xe0|Castellano|NULL
  
  on the same cell, ignoring the '|' completelly
  
  on 'postmaster.init' I have: LANG=es_ES but doesnt' works...
  using tabulators as a separators also causes same problem...
  
  any pointers to solve this will be really apreciated
  
  the other problem is that if a m$ access database has a return
carraige on
  a text cell the import also fails.
  
  
  bests from barcelona,
  teixi.
  



[HACKERS] hacker mechanism for m$access - pgsql on different language systems

2001-02-23 Thread Jaume Teixi

Hi,
my customers have his local m$ access db's locally then export them on
.txt with tab or | separated, then put on my server trought ftp.

and is working ok except that the customers are on spanish databases then
a data like:
--DATE-NAME-LANG--
  1/6/2000|Ferran Adri|Castellano|

when sended trought ftp on my server is converted to:
--DATE-NAMELANG--
  1/6/2000|Ferran Adri\xe0|Castellano|

so when imported on Postgresql with:
COPY products FROM '/var/lib/postgres/iii2.txt' USING DELIMITERS '|' \g
produces:
--DATE-NAME---LANG--
  1/6/2000|Ferran Adri\xe0|Castellano|NULL

on the same cell, ignoring the '|' completelly

on 'postmaster.init' I have: LANG=es_ES but doesnt' works...
using tabulators as a separators also causes same problem...

any pointers to solve this will be really apreciated

the other problem is that if a m$ access database has a return carraige on
a text cell the import also fails.


bests from barcelona,
teixi.