[SQL] dump and schema

2003-12-15 Thread van Elsacker Frans
I have a problem with date default and schema's and don't know wether I am doing something wrong or not. All my tables (more than 100) have a field datumi of type date default today, as this example: CREATE TABLE tabel ( datumi date DEFAULT 'today', ); taking a dump or a sc

Re: [SQL] dump and schema

2003-12-15 Thread Tom Lane
van Elsacker Frans <[EMAIL PROTECTED]> writes: > All my tables (more than 100) have a field datumi of type date default > today, as this example: > CREATE TABLE tabel ( > > datumi date DEFAULT 'today', > > ); This does not work anymore in PG 7.4. You need something like

Re: [SQL] Interest IN problem on 7.4

2003-12-15 Thread pginfo
Hi, thanks a lot. All is ok now. regards, ivan. Stephan Szabo wrote: > On Sat, 13 Dec 2003, pginfo wrote: > > > Hi, > > > > I am using pg 7.4. > > > > Pls, see this test: > > > > tt07=# update a_cars set dog_or_free=0 where virtualen=0 and > > dog_or_free=4 and ids NOT IN ( select oc.ids_car_rea

[SQL] NOT-IN CLAUSE

2003-12-15 Thread Prashant Dalal
Hi, My Following select st. is running from last one day. I think the problem is NOT IN clause. Please suggest the alternative select clause. SELECT resreq.proj, resreq.ver, substr(resreq.act, -5, 5) act, resreq.rn, null, null, resreq.rl, resreq.dr, resreq.ra FROM resreq WHERE r

Re: [SQL] NOT-IN CLAUSE

2003-12-15 Thread Bruno Wolff III
On Mon, Dec 15, 2003 at 12:14:17 -0500, Prashant Dalal <[EMAIL PROTECTED]> wrote: > Hi, > > My Following select st. is running from last one day. I think the problem is > NOT IN clause. > Please suggest the alternative select clause. NOT IN was especially slow up until Postgres 7.4. If using 7.

[SQL] arrays in pl/pgsql

2003-12-15 Thread Michael Shapiro
Is it possible in pl/pgsql to declare and then assign to arrays? For example if I declare an array as follows DECLARE dn text[]; How do I assign the first element to a string (say 'a'). I have tried the following (which doesn't work) dn[1] := \'a\'; The parser do

Re: [SQL] arrays in pl/pgsql

2003-12-15 Thread Tom Lane
Michael Shapiro <[EMAIL PROTECTED]> writes: > I have tried the following (which doesn't work) > dn[1] := \'a\'; > The parser doesn't like the [ that follows dn. I believe Joe Conway fixed this in 7.4. Note that you also need to initialize the array to something, because assigning to an elem