Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Standards

2001-06-06 Thread Stephan Szabo
On Wed, 6 Jun 2001, Mark Stosberg wrote: > > Hello, > > I'm a long time Postgres user who uses MySQL when I have to. I recently > ran into an issue with MySQL where this construct didn't do what I expect: > > WHERE date_column = NULL > > I expected it to work like "date_column IS NULL" like i

[SQL] behavior of ' = NULL' vs. MySQL vs. Standards

2001-06-06 Thread Mark Stosberg
Hello, I'm a long time Postgres user who uses MySQL when I have to. I recently ran into an issue with MySQL where this construct didn't do what I expect: WHERE date_column = NULL I expected it to work like "date_column IS NULL" like it does it Postgres 7.0.2, but instead it returned an empty r

[SQL] Functions and Triggers

2001-06-06 Thread Hunter, Ray
Title: Functions and Triggers I need help on creating a sql function that will check four rows in a table based on that check it will update another row on a different table.  I want to use this function in a trigger statement. Table 1 (Test Type) id cat sub-cat test        stat

[SQL] How to create a *pass-through-query* in postgresql

2001-06-06 Thread DI Hasenöhrl
Hello all,   I use postgresql as backend and MsAccess97 as frontend via ODBC. I know, how to use VBA and pass through queries to update or insert rows in postgresql-tables. But I don't know, how to do this the other way round, from postgresql to MsAccess. I want to develop a trigger, which u

Re: [SQL] Cascade constraint gone!!!

2001-06-06 Thread Stephan Szabo
On Wed, 6 Jun 2001, Linh Luong wrote: > I recently wipe my database away. And some of the tables have a UPDATE > CASCADE on it to another table. > When I reload the data from my backup that I did with pg_dumpall. My > code started to give me an error because I tried to modify a table that > w

[SQL] Cascade constraint gone!!!

2001-06-06 Thread Linh Luong
Hi, I recently wipe my database away. And some of the tables have a UPDATE CASCADE on it to another table. When I reload the data from my backup that I did with pg_dumpall. My code started to give me an error because I tried to modify a table that was reference from another table. But the re

Re: [SQL] Tutorial : using foreign keys, retrictions etc

2001-06-06 Thread Roberto Mello
On Sat, Jun 02, 2001 at 06:49:55PM -0400, Mario Bittencourt wrote: > Hi, > > I've decided to switch from mysql to postgresql as my database server. Good for you :) > procedures, views) and I'd like to know if there is some tutorial/snippet > of code regarding such features spec

RE: [SQL] Distinct Values

2001-06-06 Thread KuroiNeko
> Author URL > --- > A http://www.xyz http://www.abc .com > - - > B http://www.def http://www.ijk http://www.rst .com > - - > > If that is what you want, you cannot manage it. Sure, in no way this is possible with SQL (in

Re: [SQL] php-nuke

2001-06-06 Thread Roberto Mello
On Wed, May 30, 2001 at 11:14:38PM +0530, Sharmad Naik wrote: > hi, > I wanted to know that does postgresql database support php-nuke This is a php-nuke question. Head to their website and it should be stated there somewhere. -Roberto -- +| http://fslc.usu.edu USU Free

Re: [SQL] audit trail and system catalogs

2001-06-06 Thread Stephan Szabo
On Wed, 6 Jun 2001, Markus Wagner wrote: > The problem is, how to get the names of all tables and their attributes? I > looked into the system tables ("pg_*"), but there were many tables and > many attributes for *my* tables, and I did not figure out how to > distinguish my tables and my attr

Re: [SQL] Tutorial : using foreign keys, retrictions etc

2001-06-06 Thread Stephan Szabo
On Sat, 2 Jun 2001, Mario Bittencourt wrote: > Hi, > > I've decided to switch from mysql to postgresql as my database server. I > do mostly web programming (who doesnt these days?) with more than a 100 > sites developed (using mysql). > > I've read about postgresql and it's fe

Re: [SQL] "Day" from 8am to 3am

2001-06-06 Thread Judd Maltin
On Wed, 6 Jun 2001, Tom Lane wrote: > Judd Maltin <[EMAIL PROTECTED]> writes: > > I have a special application that considers a playday to be from 8am to > > 3pm the next morning. The system then does maintenance from 3am till 8am > > (if necessary). > > 8am is in the eye of the beholder. Why

Re: [SQL] seleting all dates between two dates

2001-06-06 Thread Josh Berkus
Jeff, > I am interested in a query where I can select all dates between two > dates. I > figure I can build a table of all valid dates with a resonable range > and > then select from that table, but I would like to use the power of sql > to get > the work done without building a date table. Any i

[SQL] audit trail and system catalogs

2001-06-06 Thread Markus Wagner
Hi, we strongly need to implement an audit trail as a prerequisite for clinical trials, that is a functionality which records any change of any data item in a database into one single table containing these events. I found that one could use rules for this, but this would require one rule for

Re: [SQL] "Day" from 8am to 3am

2001-06-06 Thread Tom Lane
Judd Maltin <[EMAIL PROTECTED]> writes: > I have a special application that considers a playday to be from 8am to > 3pm the next morning. The system then does maintenance from 3am till 8am > (if necessary). 8am is in the eye of the beholder. Why not run the system in a timezone selected such th

Re: [SQL] Large Objects - lo_export

2001-06-06 Thread [EMAIL PROTECTED]
You must be logged in as the unix user postgres. (Presuming /home/postgres/ is writable by postgres and the file doesn't exist.) Try doing touch /home/postgres/junk.tgz from the command line. It should also fail. Troy > > > Hi to list ! > > while running psql as 'postgres' user, i exec

[SQL] Tutorial : using foreign keys, retrictions etc

2001-06-06 Thread Mario Bittencourt
Hi, I've decided to switch from mysql to postgresql as my database server. I do mostly web programming (who doesnt these days?) with more than a 100 sites developed (using mysql). I've read about postgresql and it's features (such as triggers, stored procedures, views) and I'd

[SQL] Foreign Keys and Inheritance

2001-06-06 Thread Dennis Muhlestein
If I have table A, which contains a primary key, and table B which inherits from A. How can I Create a Foreign Key on table C that references A, but will also pass if a record in inserted in to B. for instance: create table A ( prim_key char(20) not null primary key ); create table B

[SQL] seleting all dates between two dates

2001-06-06 Thread Jeff Barrett
I am interested in a query where I can select all dates between two dates. I figure I can build a table of all valid dates with a resonable range and then select from that table, but I would like to use the power of sql to get the work done without building a date table. Any ideas? For example: I

[SQL] help with a function

2001-06-06 Thread Clayton Cottingham aka drfrog
consider this function: CREATE FUNCTION "test" (integer) RETURNS text AS 'return "select * from testt limit $_[o];";' LANGUAGE 'plperl'; how would i get it to just run the query instead of just return it as text using plperl? ---(end of broadcast)

Re: [SQL] How to use the type int2vector ?

2001-06-06 Thread David BOURIAUD
David BOURIAUD wrote: > > Hi the list ! > How can I make a test on a int2vector ? If I have a vector that contains > (1, 2, 5, 9), how can I check these values incivicually ? Thanks by > advance for your help. I answer myself by posting another question... Is there a way to know from the system t