> The "Name Alike" PL/pgSQL function has been posted on Roberto Mello's
> cookbook:
>
>
http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=96
7
>
> This function requires Joe Conway's port of the Metaphone and
> Levenshtein functions to PostgreSQL, available from /contrib on
On Mar 07 Ago 2001 20:53, you wrote:
> =?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <[EMAIL PROTECTED]> writes:
> > As I said before, I am playing around with views and rules, and found out
> > that I have something wrong in one of the rules. My delete rule says
> > something like this:
> >
> > CREATE RU
=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <[EMAIL PROTECTED]> writes:
> As I said before, I am playing around with views and rules, and found out
> that I have something wrong in one of the rules. My delete rule says
> something like this:
> CREATE RULE admin_delete AS ON
> DELETE TO admin_view
> D
As I said before, I am playing around with views and rules, and found out
that I have something wrong in one of the rules. My delete rule says
something like this:
CREATE RULE admin_delete AS ON
DELETE TO admin_view
DO INSTEAD (
DELETE FROM carrera WHERE id_curso=old.id_curso;
DELETE FROM
On Lun 06 Ago 2001 21:02, Josh Berkus wrote:
> Martin,
>
> > I have a bunch of tables which I give access through a view. The
> > problem is
> > that in the main table there are columns, that are referenced to
> > another
> > tables column, that have NULLs.
> > In the SELECT inside the view's defi
Josh Berkus wrote:
> Jan,
>
> > All of this is wrong. If the constraints are defined to be
> > INITIALLY DEFERRED, all you have to do is to wrap all the
> > changes that put the database into a temporary inconsistent
> > state into a transaction. What is a good idea and
"Josh Berkus" <[EMAIL PROTECTED]> writes:
>> -- use labels to name columns in this way
>>
>> ... select col1 userid, col2 name from ... (instead of using AS)
> Because AS is the ANSI SQL 92 standard. And we like standards.
Actually, SQL92 says that AS is optional. However, Postgres contains
Jan Wieck <[EMAIL PROTECTED]> writes:
> The point is that we based our implementation of foreign keys
> on the SQL3 specs. DEFERRED is not in SQL-92 AFAIK.
I still have a concern about this --- sure, you can set up the circular
references using ALTER TABLE, but will pg_dump dump them corr
Tom Lane wrote:
> Jan Wieck <[EMAIL PROTECTED]> writes:
> > The point is that we based our implementation of foreign keys
> > on the SQL3 specs. DEFERRED is not in SQL-92 AFAIK.
>
> I still have a concern about this --- sure, you can set up the circular
> references using ALTER TABLE, but
Folks,
The "Name Alike" PL/pgSQL function has been posted on Roberto Mello's
cookbook:
http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=967
This function requires Joe Conway's port of the Metaphone and
Levenshtein functions to PostgreSQL, available from /contrib on CVS
Jan,
> All of this is wrong. If the constraints are defined to be
> INITIALLY DEFERRED, all you have to do is to wrap all the
> changes that put the database into a temporary inconsistent
> state into a transaction. What is a good idea and strongly
> advised anywa
Josh Berkus wrote:
> Denis,
>
> > I have a case where I wanted to do circular REFERENCES, is this
> > impossible ?
>
> It can be done. It's just a bad idea.
I don't see why it is a bad idea to apply the full business
model to the database schema.
> > Now, each shop REFERENCES a custom
Mounir,
> -- do a join between two databases within the same installation.
>
> ... where db1.table1.userid = db2.table2.userid
Because this is not supported on PostgreSQL. There are a number of
reasons, and it may never be supported because there are drawbacks to
allowing databases to referen
On Tue, 7 Aug 2001, Josh Berkus wrote:
> Denis,
>
> > I have a case where I wanted to do circular REFERENCES, is this
> > impossible ?
>
> It can be done. It's just a bad idea.
>
> > We deliver to the *shops* of our *customers*.
> > We have therefore two tables :
> > - customers (enterpris
Graham,
> GC> SELECT Invoices.InvoiceDate + INTERVAL Acct.AverageDaysToPay
> 'Days'
Actually, all you're missing is some punctuation. Don't skimp on the ::
and () ! Plus, you should use explicit CASTs wherever you remember
them:
SELECT Invoices.InvoiceDate + INTERVAL(CAST(Acct.AverageDaysToPa
Hi Denis,
I've just had a similar experience with a 3-way circle. I have members, who
belong in regions. Each region had a Regional Liasson Officer who was a
member.
I got round it by creating the three tables, but missing out one of the
references - i.e. the one that links table 1 to tabl
-- do a join between two databases within the same installation.
... where db1.table1.userid = db2.table2.userid
-- use labels to name columns in this way
... select col1 userid, col2 name from ... (instead of using AS)
-- do an update with full referenced colomns
... update table1 set ta
> "GC" == Graham Coates <[EMAIL PROTECTED]> writes:
GC> SELECT Invoices.InvoiceDate + INTERVAL '41 Days'
GC> works fine
GC> but when trying to substitute the number of days with a value form a field
GC> e.g.
GC> SELECT Invoices.InvoiceDate + INTERVAL Acct.AverageDaysToPay 'Days'
try
SELE
Denis,
> I have a case where I wanted to do circular REFERENCES, is this
> impossible ?
It can be done. It's just a bad idea.
> We deliver to the *shops* of our *customers*.
> We have therefore two tables :
> - customers (enterprise, financial information, and so on...)
> - shop (with a na
[EMAIL PROTECTED] wrote:
> Josh,
>
> Fuck you and the high horse you rode in on.
Stop that language immediately! It is not accepted on any of
our PostgreSQL mailing lists.
> Yes as a matter of fact I did forget the quote marks. Do you think reading
> that book will help with my silly sy
On Mon, 6 Aug 2001, Tom Lane wrote:
> Thomas Good <[EMAIL PROTECTED]> writes:
> > Kate, he uses a diff module by the same author (Edmund Mergl) but with
> > a very diff syntax. The advantage of the DBI - Kris, if you're
> > interested - is that the syntax is much like ESQL/C and the code is
> >
>
>
>Which leads to :
>
>CREATE TABLE shops ( id_shop SERIAL PRIMARY KEY, id_cust integer
>REFERENCES customers, ...)
You can't reference to a table who doesn't exists still.
>CREATE TABLE customers ( id_cust SERIAL PRIMARY KEY, id_defaultshop
>integer REFERENCES shops, ...)
Perhaps
Aug 7, 11:54 +0200, Denis Bucher wrote:
> We deliver to the *shops* of our *customers*.
> We have therefore two tables :
> - customers (enterprise, financial information, and so on...)
> - shop (with a name, street, phone number, name of manager)
>
> Now, each shop REFERENCES a customer so th
Hello !
I have a case where I wanted to do circular REFERENCES, is this
impossible ?
Just an example where it would be useful :
We deliver to the *shops* of our *customers*.
We have therefore two tables :
- customers (enterprise, financial information, and so on...)
- shop (with a name, st
Aug 6, 23:35 -0500, Robby Slaughter wrote:
> SELECT INTO it. Example:
>
> CREATE TABLE sample (
> id INTEGER,
> data TEXT,
> badcolumn DATE );
>
> Now to delete the bad column table:
>
> CREATE TABLE sample_copy (
> id INTEGER,
> data TEXT);
>
> and then copy it all over:
>
> SELECT
25 matches
Mail list logo