Re: [GENERAL] Limiting with a left outer join

2006-02-13 Thread Michael Fuhr
On Sun, Feb 12, 2006 at 08:03:07AM -0800, Bill Moseley wrote: > BTW -- Is there a way to turn something like this into a view? The > 2 domain bind parameters will alway match, and the only other > input parameters are the two review mode booleans. That is, the > input to the query is a domain id,

[GENERAL] Object ownership in a new database

2006-02-13 Thread Russell Smith
Hello all, When you create a new database, not all objects in that database are owned by the database owner. Now some of those may need to be owned by a superuser, eg C functions. However should other things such as the public schema or other general objects be owned by the database owner,

[GENERAL] differences between pg_dump and pg_restore with -t

2006-02-13 Thread alexandre - aldeia digital
Hi, If I do: pg_dump -Fc -t table database > table.sql The pg_dump returns the DDL of the table, the data and the DDL for indexes and PK. If I use -s, only the structure, but all is returned. But if I do: pg_dump -Fc database > backup.file pg_restore -Fc -t table backup.file > table.sql On

Re: [GENERAL] Database Comparison tool?

2006-02-13 Thread sualeh . fatehi
You can use SchemaCrawler, a free open-source tool that can compare schemas as well as data. SchemaCrawler is a command-line tool to output your database schema and data in a readable form. The output is designed to be diff-ed with previous versions of your database schema. http://schemacrawler.so

[GENERAL] Unhandled Exception - Executing Samples under win32

2006-02-13 Thread Eric Chapdelaine
Hi,   I have downloaded the binairies no installer version of PostgreSql for windows.  (postgresql-8.1.3-1-binaries-no-installer) I am able to init a database ( initdb), create users and create a database. I am also able to use the psql executable shell too to Create Table, Insert recor

Re: [GENERAL] Get affected table name in trigger function?

2006-02-13 Thread Tom Lane
Emi Lu <[EMAIL PROTECTED]> writes: > Is it possible to get current table name such as (TG_TABLENAME?) in a > trigger function? TG_RELNAME ... or look it up from the table OID TG_RELID ... or pass it in as a trigger parameter ... regards, tom lane

[GENERAL] Get affected table name in trigger function?

2006-02-13 Thread Emi Lu
Hello, Is it possible to get current table name such as (TG_TABLENAME?) in a trigger function? For example, tables t1, t2, t3 all depend on one trigger function. In the trigger function, is it possible to get the current affected table name - is it t1, t2 or t3 ? Thanks a lot, Emi --

Re: [GENERAL] Why does an ON SELECT rule have to be named "_RETURN"?

2006-02-13 Thread Stephan Szabo
On Mon, 13 Feb 2006, Ken Winter wrote: > You're right: This thing I call a "view-table" would behave *exactly* like a > view that has insert, update, and delete rules. > > The *only* difference I'm trying to achieve is to get it stored in > pg_catalog.pg_class with relkind = 'r' ("ordinary table"

Re: [GENERAL] altering objects owned by other user

2006-02-13 Thread Tom Lane
Marc Munro <[EMAIL PROTECTED]> writes: > I want to allow a non-superuser to alter objects owned by another user. Use 8.1, have the objects in question be owned by a group (role), grant membership in the group as appropriate. > This should be an audited operation (logging a notice of what was done

[GENERAL] altering objects owned by other user

2006-02-13 Thread Marc Munro
I want to allow a non-superuser to alter objects owned by another user. This should be an audited operation (logging a notice of what was done to the postgres logs is sufficient). This is so that I can allow trusted users to perform maintenance operations without having to give them either superus

Re: [GENERAL] type int2vector

2006-02-13 Thread Tom Lane
=?ISO-8859-1?Q?William_Leite_Ara=FAjo?= <[EMAIL PROTECTED]> writes: > Anyone has or knows a function to manipulate/work with int2vector type= > ? Since 8.1 you can treat it as a regular int2 array. regards, tom lane ---(end of broadcast)--

[GENERAL] type int2vector

2006-02-13 Thread William Leite Araújo
Hi all,  Anyone has or knows a function to manipulate/work with int2vector type? Tank's-- William Leite Araújo

Re: [GENERAL] using schema-qualified names in INSERTs

2006-02-13 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > I sometimes have trouble understanding the edicts of the wise ones - > anyone know what the rationale for this is? I'm not sure whether the SQL spec authors foresaw this (or maybe even have added it themselves in SQL2003), but the main reason why not

[GENERAL] differences between pg_dump and pg_restore with -t

2006-02-13 Thread alexandre - aldeia digital
Hi, If I do: pg_dump -Fc -t table database > table.sql The pg_dump returns the DDL of the table, the data and the DDL for indexes and PK. If I use -s, only the structure, but all is returned. But if I do: pg_dump -Fc database > backup.file pg_restore -Fc -t table backup.file > table.sql Only

Re: [GENERAL] Why does an ON SELECT rule have to be named "_RETURN"?

2006-02-13 Thread Tony Caduto
Ken Winter wrote: Stephan ~ You're right: This thing I call a "view-table" would behave *exactly* like a view that has insert, update, and delete rules. The *only* difference I'm trying to achieve is to get it stored in pg_catalog.pg_class with relkind = 'r' ("ordinary table") rather than '

Re: [GENERAL] using schema-qualified names in INSERTs

2006-02-13 Thread John D. Burger
... I can imagine that allowing the syntax on INSERT might simplify the generation of SQL in certain circumstances. There's also the Principle of Least Surprise, etc. There's also something called the SQL standard, which forbids both of those syntaxes. Ah - I should have checked that. I so

Re: [GENERAL] using schema-qualified names in INSERTs

2006-02-13 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > Arguably a tad inconsistent. I don't know what the OP's rationale was, > but I can imagine that allowing the syntax on INSERT might simplify the > generation of SQL in certain circumstances. There's also the Principle > of Least Surprise, etc. Th

Re: [GENERAL] using schema-qualified names in INSERTs

2006-02-13 Thread John D. Burger
The list of columns can only apply to the table you've just named - that's the only thing that makes sense. That's true for a SELECT from a single table, too, but the qualified syntax is allowed there. Also, this is allowed: # update testtab set b = testtab.b * 3; But this isn't: # upd

Re: [GENERAL] Why does an ON SELECT rule have to be named "_RETURN"?

2006-02-13 Thread Ken Winter
Stephan ~ You're right: This thing I call a "view-table" would behave *exactly* like a view that has insert, update, and delete rules. The *only* difference I'm trying to achieve is to get it stored in pg_catalog.pg_class with relkind = 'r' ("ordinary table") rather than 'v' ("view"). The *o

Re: [GENERAL] Dropping a database that does not exist

2006-02-13 Thread Tom Lane
"Dave Page" writes: >> Tham Shiming <[EMAIL PROTECTED]> writes: >>> OK, checking pg_shadow, the usesysid for each entry is unique. >>> pg_database, however, showed the duplicate databases. A >>> short sample output from pgAdmin. >>> >>> datnamedatdba >>> db1101 >>> db1101 >>

Re: [GENERAL] Dropping a database that does not exist

2006-02-13 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane > Sent: 13 February 2006 14:36 > To: Tham Shiming > Cc: Uwe C. Schroeder; pgsql-general@postgresql.org > Subject: Re: [GENERAL] Dropping a database that does not exist > > Tham Shiming <[E

Re: [GENERAL] Dropping a database that does not exist

2006-02-13 Thread Tom Lane
Tham Shiming <[EMAIL PROTECTED]> writes: > OK, checking pg_shadow, the usesysid for each entry is unique. > pg_database, however, showed the duplicate databases. A short sample > output from pgAdmin. > datnamedatdba > db1101 > db1101 > db2102 > db3103 > db3

Re: [GENERAL] Dropping a database that does not exist

2006-02-13 Thread Tham Shiming
Well, not exactly support. We didn't create the duplicate databases, it just appear suddenly out of nowhere, which was also odd. OK, checking pg_shadow, the usesysid for each entry is unique. pg_database, however, showed the duplicate databases. A short sample output from pgAdmin. datname

Re: [GENERAL] using schema-qualified names in INSERTs

2006-02-13 Thread Richard Huxton
Frank Church wrote: Does PostgreSQL support INSERT syntax of this kind - insert into table (table.col1, table.col2, table.col3) values('one', 'two', 'three')? Trying it out generates an error. It works when the 'table' bit is removed from the column names. What would this do for you? What wou

Re: [GENERAL] using schema-qualified names in INSERTs

2006-02-13 Thread Martijn van Oosterhout
On Mon, Feb 13, 2006 at 01:33:31PM +, Frank Church wrote: > Does PostgreSQL support INSERT syntax of this kind - > > insert into table (table.col1, table.col2, table.col3) values('one', 'two', > 'three')? > > Trying it out generates an error. It works when the 'table' bit is removed > from >

[GENERAL] using schema-qualified names in INSERTs

2006-02-13 Thread Frank Church
Does PostgreSQL support INSERT syntax of this kind - insert into table (table.col1, table.col2, table.col3) values('one', 'two', 'three')? Trying it out generates an error. It works when the 'table' bit is removed from the column names. F Church ---(end of broadcast)---

[GENERAL] PG and Tivoli Data Protection

2006-02-13 Thread Sergey Karin
Hi All!Does anybody use Postgres with storage managers like Tivoli Data Protection? Are there aby abilities for that in PG (I use 8.1)?Sergey Karin.

Re: [GENERAL] indexes for ILIKE

2006-02-13 Thread Martijn van Oosterhout
On Mon, Feb 13, 2006 at 03:33:34PM +0300, Ilja Golshtein wrote: > Hello! > > Is there any way to use an index to pick up text field > start from a substring? > I need to ignore case of characters and encoding I use is UTF-8. > > I am aware of text_pattern_ops and stuff, though > FAQ says ILIKE

[GENERAL] indexes for ILIKE

2006-02-13 Thread Ilja Golshtein
Hello! Is there any way to use an index to pick up text field start from a substring? I need to ignore case of characters and encoding I use is UTF-8. I am aware of text_pattern_ops and stuff, though FAQ says ILIKE does not use indexes. Thanks. -- Best regards Ilja Golshtein ---

Re: [GENERAL] r trim of characters other than space

2006-02-13 Thread Alban Hertroys
surabhi.ahuja wrote: patName := trim($1); select trim(trailing `^` from patName) INTO patName; trim(patName); I think this line should contain an assignment. -- Alban Hertroys ---(end of broadcast)--- TIP 9: In versions be

Re: [GENERAL] Debian apt-get

2006-02-13 Thread Peter Eisentraut
Riaan van der Westhuizen wrote: > Where can I get Latest PostgreSQL 8.1.2 64 Bit version for Debian > (Ubuntu Server) with apt-get? Once you have decided whether you actually mean Debian or Ubuntu, you should find 8.1 packages in the respective regular apt repository. -- Peter Eisentraut http:/

[GENERAL] Debian apt-get

2006-02-13 Thread Riaan van der Westhuizen
Hi All Where can I get Latest PostgreSQL 8.1.2 64 Bit version for Debian (Ubuntu Server) with apt-get? Thanks Riaan ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your