Re: [GENERAL] Import an Excel table to a Postgresql one

2004-09-17 Thread Mike Nolan
> > How to import an Excel table into a Postgresql table in a simple way? Another way is to save the Excel table as a dBase file and import it using the dbf2pg utility in the contrib/dbase directory. -- Mike Nolan ---(end of broadcast)--- TIP 9: the

Re: [GENERAL] Import an Excel table to a Postgresql one

2004-09-17 Thread Bruno Wolff III
On Fri, Sep 17, 2004 at 18:50:53 +0200, Daniele Beauquier <[EMAIL PROTECTED]> wrote: > How to import an Excel table into a Postgresql table in a simple way? Export it into CSV or TSV format and then use \copy in psql to load it. ---(end of broadcast)-

Re: [GENERAL] Import an Excel table to a Postgresql one

2004-09-17 Thread Peter Eisentraut
Daniele Beauquier wrote: > How to import an Excel table into a Postgresql table in a simple way? Export into a text file and import using COPY. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 2: you can g

Re: [GENERAL] PG case sensitivity

2004-09-17 Thread Christian Sell
> > The fault is with your program components that are insisting on upper > > case rather than accepting either case. > > In defence of this unknown component, the sql specifications says that > identifiers should be upper cased where pg do lower case. > > I would welcome a initdb setting that defi

[GENERAL] Import an Excel table to a Postgresql one

2004-09-17 Thread Daniele Beauquier
How to import an Excel table into a Postgresql table in a simple way? ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] psql + autocommit

2004-09-17 Thread John Sidney-Woollett
Except transparency... John Sidney-Woollett Peter Eisentraut wrote: John Sidney-Woollett wrote: Why not create this file during the "make install", and explicitly set the current/standard default options (for psql) in the $PREFIX/share/psqlrc file? Because it would take up space, computing power,

Re: [GENERAL] Default value if query returns 0 rows?

2004-09-17 Thread Csaba Nagy
[snip] > Another way is a subselect: > > select coalesce((select id from map where name = 'foo'), -1); Then why not: select coalesce((select id from map where name = 'foo' limit 1), -1); This should work even if there are more rows with foo. > > but this one will actively blow up if the

Re: [GENERAL] psql + autocommit

2004-09-17 Thread Peter Eisentraut
John Sidney-Woollett wrote: > Why not create this file during the "make install", and explicitly > set the current/standard default options (for psql) in the > $PREFIX/share/psqlrc file? Because it would take up space, computing power, and attention without achieving anything. -- Peter Eisentra

Re: [GENERAL] Default value if query returns 0 rows?

2004-09-17 Thread Tom Lane
Lars Kellogg-Stedman <[EMAIL PROTECTED]> writes: > I have a simple two-column table mapping names to ids. I'd like to write a > select statement that will return a default value if a given name isn't > found in the table. That is, I want something equivalent to the following > pseudocode: > if

Re: [GENERAL] Converting varchar() to text

2004-09-17 Thread Steve Atkins
On Fri, Sep 17, 2004 at 10:56:36AM -0400, Tom Lane wrote: > Robert Treat <[EMAIL PROTECTED]> writes: > > On Wednesday 15 September 2004 12:29, Steve Atkins wrote: > >> Is there a safe way to convert varchar(n) to text, other than create > >> a new column, update, delete column, rename? > > > I wou

Re: [GENERAL] Default value if query returns 0 rows?

2004-09-17 Thread Lars Kellogg-Stedman
On Fri, 17 Sep 2004, Bruno Wolff III wrote: > > > > if exists (select 1 from map where name = 'foo') then > > select id from map where name = 'foo' > > else > > select -1 > > end if > > > > If there can be at most one match you can use a subselect and coalesce. > Bruno, Thanks

Re: [GENERAL] Default value if query returns 0 rows?

2004-09-17 Thread Bruno Wolff III
On Fri, Sep 17, 2004 at 11:03:48 -0400, Lars Kellogg-Stedman <[EMAIL PROTECTED]> wrote: > Hello, > > I have a simple two-column table mapping names to ids. I'd like to write a > select statement that will return a default value if a given name isn't > found in the table. That is, I want someth

[GENERAL] Default value if query returns 0 rows?

2004-09-17 Thread Lars Kellogg-Stedman
Hello, I have a simple two-column table mapping names to ids. I'd like to write a select statement that will return a default value if a given name isn't found in the table. That is, I want something equivalent to the following pseudocode: if exists (select 1 from map where name = 'foo') then

Re: [GENERAL] Converting varchar() to text

2004-09-17 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > On Wednesday 15 September 2004 12:29, Steve Atkins wrote: >> Is there a safe way to convert varchar(n) to text, other than create >> a new column, update, delete column, rename? > I wouldn't say it's impossible to do it, but several people have reported

Re: [GENERAL] psql + autocommit

2004-09-17 Thread John Sidney-Woollett
Why not create this file during the "make install", and explicitly set the current/standard default options (for psql) in the $PREFIX/share/psqlrc file? If the file is deleted or not found then the current/standard default options would still apply - but atleast the default are there for all to

Re: [GENERAL] psql + autocommit

2004-09-17 Thread Bruce Momjian
Lars Haugseth wrote: > * Michael Paesold: > | Peter Eisentraut wrote: > | > Lars Haugseth wrote: > | > > Version 8.0.0beta2 supports a global configuration file. It's should > | > > be located in '~postgres/etc/pgsql'. > | > > | > That would be pretty useless, since normal users often don't have re

Re: [GENERAL] psql + autocommit

2004-09-17 Thread Lars Haugseth
* Michael Paesold: | Peter Eisentraut wrote: | > Lars Haugseth wrote: | > > Version 8.0.0beta2 supports a global configuration file. It's should | > > be located in '~postgres/etc/pgsql'. | > | > That would be pretty useless, since normal users often don't have read | > access to another user's hom

Re: [GENERAL] pg_dump in cycle

2004-09-17 Thread Lars Haugseth
* Najib Abi Fadel: | This seems to be more interesting for shell scripting: | | psql -d DatabaseName -c 'select datname from pg_database where not | datistemplate' ; | | datname | - | fgm_eval | hotline | usj | dragon_devel | dragon_joujou | dragon_devel_v2 | dragon_pro

Re: [GENERAL] PSQLFS - PostgreSQL File System

2004-09-17 Thread Tatsuo Ishii
> If this is not the right list for this please forgive me, and point me > to the right one. > > For a bit of fun I have created a file system, that looks like a normal > mounted file tree to the user, but who's data is stored on a PostgreSQL > database server. It uses LUFS to do it. > > Like LU

Re: [GENERAL] psql + autocommit

2004-09-17 Thread Michael Paesold
Peter Eisentraut wrote: > Lars Haugseth wrote: > > Version 8.0.0beta2 supports a global configuration file. It's should > > be located in '~postgres/etc/pgsql'. > > That would be pretty useless, since normal users often don't have read > access to another user's home directory. Further up in th

Re: [GENERAL] Is it possible to get the 7.4.1 static docs in HTML form anymore?

2004-09-17 Thread Peter Eisentraut
Hadley Willan wrote: > Reason being I'd like to install them locally on my laptop so that > when I'm lap topping it, I still have docs without the need for an > Internet connection. The documentation is always included in the release tarball. -- Peter Eisentraut http://developer.postgresql.org/~

Re: [GENERAL] psql + autocommit

2004-09-17 Thread Peter Eisentraut
Lars Haugseth wrote: > Version 8.0.0beta2 supports a global configuration file. It's should > be located in '~postgres/etc/pgsql'. That would be pretty useless, since normal users often don't have read access to another user's home directory. -- Peter Eisentraut http://developer.postgresql.org/

Re: [GENERAL] Strange UTF-8 behaviour

2004-09-17 Thread Marco Ferretti
Thanks to all you guys ! You really helped marco

Re: [GENERAL] Is it possible to get the 7.4.1 static docs in HTML

2004-09-17 Thread Katsaros Kwn/nos
On Fri, 2004-09-17 at 07:43, Hadley Willan wrote: > Reason being I'd like to install them locally on my laptop so that > when I'm lap topping it, I still have docs without the need for an > Internet connection. In v7.4.2 there is a /usr/local/pgsql/doc/html directory (created during default instal