lengths.)
Is there any plan to support that?
--
Oliver Elphick [EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
===
to see
how it works.
If you can't do that, you can install a different version from source in
a different directory tree; then have its postmaster run on a different
port. Specify the port number when connecting so as to get to the
postmaster you want.
--
Oliver Elphick
On Tue, 2005-11-29 at 10:31 +, Oliver Elphick wrote:
> SELECT tableoid::regproc, * from animals;
regproc should be regclass; sorry.
--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 10
verriding a
> constructor or method, using the Class object or instanceof. Is there
> anyway for a table to "know" it's "class" in this scenario?
SELECT tableoid::regproc, * from animals;
--
Oliver Elphick olly@lfix.co.u
var VARCHAR;
BEGIN
var := TG_ARGV[0];
IF var = 'column_1' THEN
NEW.column_1 = 'whatever';
ELSIF var = 'column_2' THEN
NEW.column_2 = 'whatever';
...
END IF;
RETURN NEW;
END;
$$
LANGUAGE plpgsql;
Oliver Elphick
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
el to use in archive formats that
-support compression. (Currently only the custom archive
-format supports compression.)
+support compression. (Currently the tar archive
+format does not support compression. The plain text format is
+compressed with gzip.)
uestion. Is there a way that I can create a
> user using password authetication at the situation I
> have no pg account like this sitation?.
Assign a password for the user with ALTER USER. Then add a suitable
line to pg_hba.conf.
Oliver Elphick
---(end of broadcast)---
TIP 6: explain analyze is your friend
You cannot start or commit a transaction inside a function. You can use
savepoints.
--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC
l) and calculate the average
> duration.
For any particular interval:
SELECT COUNT(*), AVG(duration)
FROM cdr
WHERE src='601' AND
calldate BETWEEN CAST ('2005-10-17 10:00:00' AS TIMESTAMP WITH
TIMEZONE) AND
b.partno = a.partno) as cmup, sum(qty) from my_table as a group by
partno, status, (select max(cmup) from my_table as b where b.partno =
a.partno); partno | status | cmup | sum
+--+---+-
test1 | incoming | 15.00 | 71
test1 | stock | 15.00 | 15
test2 | incoming | 1
On Tue, 2004-10-26 at 17:43 -0400, Tom Lane wrote:
> Oliver Elphick <[EMAIL PROTECTED]> writes:
> > On Tue, 2004-10-26 at 14:23 -0500, Yudie wrote:
> >> Then I do this query to get unique store number and also the cheapest
> >> price from each store:
&g
the query that returns as above but sorted
> by price?
The literal answer to your question is to put price first in the ORDER
BY clause, but I'm not convinced you actually want to know something
that simple.
--
Oliver Elphick [EMAIL PROTECTED]
Isle
e postmaster
afterwards to get it to reload the settings?
> Are there any other admin tools out there that
> i could use on a a unix box?
pgadmin3
--
Oliver Elphick [EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk
inelegant to me. Is there a regex expert in the
> house?
All the elegant approaches I can think of match the empty string. There
must be at least one digit and 0 or 1 decimal point with no other
characters permitted. If you use this as a constraint, you c
before the decimal; it would be nice to adapt it to matching a leading
> decimal (i.e. .057 ) as well. Can't see any easy way, though ...
~ '^([0-9]+|[0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)$'
--
Oliver Elphick [EMAIL PROTECTED]
Isle of Wight
~ '^[0-9]+$'
Your version only checks the beginning of the string.
> There must be an easier way like a isNumeric() function?
Not that I know of.
--
Oliver Elphick [EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.u
nto the file /tmp/grant.sql as directd earlier.
> > \o
Stop sending output to the file.
> > \i /tmp/grant.sql
Run the output file as a script, thus granting the permissions to joe.
--
Oliver Elphick [EMAIL PROTECTED]
Isle of Wight
ric can't produce any more than it
was given and it was cast from float.
bray=# select 653596708775675750507850507570708696432 ::numeric;
numeric
---------
653596708775675750507850507570708696432
(1 row)
--
Oliver Elphick
could do would be to see the
error. So he might as well turn it round, normalise the data properly
and use the database to tell the rest of the system what the data ought
to be.
Oliver Elphick
---(end of broadcast)---
TIP 3: if postin
?
If there is no unique key, how does the foreign key trigger find the
referenced row except by doing a sequential scan? Bad news! And when
one of the duplicate referenced rows changes, what should happen with ON
UPDATE or ON DELETE?
--
Oliver Elphick
On Thu, 2004-08-12 at 16:09, Oliver Elphick wrote:
> "2>" redirects standard error
I forgot to say "&1" means the file open on file descriptor 1, which is
always standard output.
So "2>&1" means send standard error to standard output, so that a pipe
On Thu, 2004-08-12 at 16:01, Devin Whalen wrote:
> > zcat cli_postDataInserts.sql.gz |
> >psql -d cli_post -U system --echo-queries -f - >trace.file 2>&1
>
> Just a few questions about your command. I tried it with one sql
> statement that I know doesn't work and the error went into the right
hich line in the input.
zcat cli_postDataInserts.sql.gz |
psql -d cli_post -U system --echo-queries -f - >trace.file 2>&1
Oliver Elphick
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
hange - id will never change. id is used as the foreign key
It can change if you use ON UPDATE CASCADE in the foreign key
definitions.
--
Oliver Elphick [EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024
is if I can shift the week from a Mon-Sun
> articulation(default with Postgre) to a Sun-Sat sequence. I need it that way
> in order to comply with a legacy stats system.
How about:
SELECT EXTRACT(WEEK FROM trans_date + '1 day'::INTERVAL)
--
Oliver Elphick
eturned to some other user's
session.
The downside is that it operates outside the transaction and therefore
cannot be rolled back. It is also necessary to run nextval() in the
session (either explicitly or by letting a serial column take its
default) before you can use currval() on the seq
On Thu, 2004-07-22 at 03:45, Kenneth Gonsalves wrote:
> hi,
> how does one get the next number in a serial type row?
When inserting a new row, do not mention the serial column in the list
of columns, or else give it the value DEFAULT.
--
Oliver E
e code in the function, because it's expecting
> all_drafts to look like draft_template, with editor_id added at the end.
>
> Is this a mis-feature?
New columns get added at the end of each table; that is standard.
--
Oliver Elphick [EMAIL PROTECT
On Thu, 2004-03-04 at 14:54, Rodrigo Sakai wrote:
> Hi people, i have a problem here.
> I'm doing a trigger that when a update occurs i need to do an update on the same
> table (target table), but as known, it causes a endless loop whithin infinit
> updates. So I need to stop the trigger af
On Mon, 2004-03-01 at 21:18, Louie Kwan wrote:
> How can I define a table with columns with sysdate as the default value..
>
> If there is no SYSDATE defined in PostgreSQL , what can I do ?
> CREATE TABLE channels(
...
> updateTimeStamp DATE default (SYSDATE),
> createTimeStamp D
GROUPed or used in an
> aggregate function
> hotel=#
>
> What Worng ??
Any items in the select list need to be aggregated (e.g.
SUM("public".items.price)) or mentioned in the GROUP BY list. Suppose
there are several
m drop the table, do
> modification and i'm must change this value to another value.
> But DBMS returns me message like that
> ERROR: You can't change sequence relation seq_id_seq
> How to do this
Use the setval() function?
--
Oliver Elphick
On Sat, 2003-09-20 at 06:10, Muhyiddin A.M Hayat wrote:
> How to Create auto_increment field in PostreSQL.
> Can I create them using Trigger.
Use the SERIAL datatype. See also the functions nextval(), currval()
and setval().
--
Oliver Elphick[EMAIL PRO
n messages.
Standard output and standard error are different streams.
The normal way to do what you want (Bourne shell syntax) is:
psql ... >outfile 2>&1
> 2) When psql is run from a script, how would one pass a password to psql?
Create a .pgpass file to read it from (see the
On Sun, 2003-09-14 at 07:49, Muhyiddin A.M Hayat wrote:
> If in MySQL i'm using type EMUN what type in Postgres?
Use a CHECK constraint:
CREATE TABLE xxx (
...
colourTEXT CHECK (colour IN ('red', 'green', 'blue')),
...
);
--
Oliver Elphick
support this -it
> seems you can only have one return value or null.
>
> Yes i'm aware this it is possible in 7.3 - can someone please confirm
> its not possible in 7.2 or provide me with an example of how to go
> about it.
Not possible in 7.2 PL/pgSQL
x27; || r.domain;
> DELETE FROM dns_raw; /* Clear table */
> RAISE NOTICE ''Network: %'', ntw;
> COPY dns_raw FROM ntw DELIMITERS ''~''; /* Get the data */
Since ntw has variable content, you need to do an EXECUTE with the
command in a text str
the ability to specify the number of decimal places
> on output but I am not sure if that would affect the primary benefit of using
> it, speed.
A money type needs to specify what currency is held. The current one
changes the currency with the locale, which makes nons
t;, meaning that you can connect
using your Unix login name, provided that user has also been created as
a PostgreSQL user. The PostgreSQL superuser is 'postgres'.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK http://www.lfi
On Wed, 2002-12-11 at 02:54, jack wrote:
> Does the following now works in postgreSQL v7.3?
>
> Select *
> from a_table
> where num1 >10;
>
> *** type of num1 is NUMERIC (12,2)
It works
--
Oliver Elphick <[EMAIL PROTECTED]>
LFIX Limited
--
gainst_anaerobes = e4.efficacy_code;
Note that you must use double quotes to quote identifiers, not single
quotes as you did in your table creation definitions, which won't work
in PostgreSQL.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
On Wed, 2002-11-20 at 15:03, Tom Lane wrote:
> Oliver Elphick <[EMAIL PROTECTED]> writes:
> > execv() is a system call to run another executable in place of the
> > current process. If the other executable is not present, or does not
> > have permissions, you will not b
/psql -d template1
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
&q
. Find out why.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"If
nce you have just reinstalled the
package. Is the file itself executable by all users? (Use "ls -l" to
check this.)
Has someone made an intermediate directory unsearchable? Every
directory in its path should have search (i.e. execute) permission for
all users. Check /usr, /
Permissions on /usr/lib/postgresql/bin/readpgenv should be 755. How
did they get unset?
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
y
won't want any rows where count1 is null. If the total of rows from
subselect c1 was likely to be less than 10, you might want to do a FULL
JOIN and order by count1, count2.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
http://
e and log_time and put it into
> log_timestamp ?
>
> update log set log_timestamp = cast (log_date as timestamp) || cast
> (log_time as timestamp)
>
> is not working.
I don't know what format you have your dates and times in, but maybe
this will work:
CAST (log_date
SELECT price
FROM table2
WHERE table1.product = table2.product);
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1
+ extract (second
from sum(if)) from i;
?column?
--
2728
(1 row)
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09
On Mon, 2002-08-26 at 10:46, Andreas Tille wrote:
> On 26 Aug 2002, Oliver Elphick wrote:
>
> > Select from the temporary table all items that satisfy the
> > constraints, insert them into the real table and delete them from
> > the temporary tabl
tablename (SELECT * FROM temptable WHERE ...);
DELETE FROM temptable WHERE ...;
COMMIT;
All good data should now be in place. The temporary table should
now contain only those items that do not satisfy the constraints for
the real table.
--
Oliver Elphick
7;'UPDATE'' AND
(NEW.column1 != OLD.column1 OR
(NEW.column1 IS NULL AND OLD.column1 IS NOT NULL) OR
(NEW.column1 IS NOT NULL AND OLD.column1 IS NULL)
)
) THEN
...
END IF;
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
gsql';
You don't seem to be returning what you have selected. I would expect
"RETURN true;" to give you an error. Shouldn't that be "RETURN
var_history_age_limit;"?
--
Oliver Elphick[EMAIL PROTECTE
tatus_log ( log_id, computer_id,schedule_id,status,
schedule_id in the insert is a column name; the alias subsitutes $1 at
that point. You had better choose variable names that don't conflict
with anything else.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of W
g about some bug with
> Postgres on Debian, but I can't remember where I heard it.
I do not think there is any Debian bug report that looks like this. The
full bug list is at
http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=postgresql
--
Oliver Elphick[E
.
FOR variable IN EXECUTE ''SELECT ...'' LOOP
END LOOP;
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
p2
> s3 | p2
> s4 | p2
> s4 | p4
> s4 | p5
>(12 rows)
>
>For such tables our desired query should return:
>
> s
>
> s1
SELECT DOR.s
FROM DEND,DOR
WHERE DOR.p = DEND.p;
--
Oliver Elphick[EMAIL PROTECTED]
OUP user;
user is a reserved word; it should not have been accepted as a group name
unless double-quoted, in which case you need to double-quote it every time
you mention it.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lf
on_id = c.emp_id
junk-# ORDER BY ordr_id;
ordr_id | assigned | completion
-+--+
1 | |
2 | aaa |
3 | aaa | bbb
4 | | bbb
(4 rows)
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wigh
istorique" and
"filmDocumentaire" should have foreign key constraints on "film". You
could maintain the contents of "film" by triggers on the other two tables.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight
Mateusz Mazur wrote:
>Hi.
>Is there any place where can I find PSQL 7.1 Debian packages?
http://people.debian.org/~elphick/postgresaql
(7.1rc4)
I'm working on final tweaks to packaging of 7.1
--
Oliver Elphick[EMAIL PROTECTED]
Is
afterwards.
If it is during COPY, edit your textfile and assign unique values to
each row.
If it is afterwards, use
SELECT setval('sequence_name', SELECT max(serial_field) FROM table);
to set the sequence value. (You probably have to be running 7.1 to use
a sub-select like t
| 27 | f | f| f| f |
> |
>(2 rows)
>
>persons=# DELETE FROM pg_user where usesysid>26;
>DELETE 0
pg_user is a view. Try
DELETE FROM pg_shadow where usename = '';
--
Oliver Elphick
ault.
>>There's nothing pointed in the packages web pages, a caveat or
>> anything. I've looked.
>
> Okay, I feel dumb now.
> It looks like Oliver Elphick (the package maintainer) changed the
>default authentication methods. Before local users
t
any other database. Nor do I know if any other databases can accommodate
user-defined functions.
But what is the actual use of this feature? Why do you need it?
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/ol
ame
---++---
6015 | 11 | Mr Graham Love (Director)
6016 | 12 | AILEEN BROWN
...
#include "postgres.h"
#include "fmgr.h"
static int32 row = 0;
PG_FUNCTION_INFO_V1(row
bill_id;
>
>When it finds some empty field, it makes all the new field empty, no
>matters
>if the other are empty or not.
In this case, empty means NULL. Any concatenation involving NULL returns
NULL; this is according to the standard.
Use COALESCE(fiel
nd line (the backslash will protect it from the
shell).
We copy the database out twice to ensure that all keys already in it are
excluded, otherwise we would be reintroducing all primary keys that were
_not_ in the desired input.
The end product is a file that excludes all primary keys that
, and include
>information about an attachment if they have one"
SELECT m.msg_id, a.attachment_id
FROM messages AS m
LEFT OUTER JOIN message-attachments AS a
ON m.msg_id = a.msg_id;
This requires 7.1 for the LEFT OUTER JOIN. In 7.0.3 you
me the years between
>1990 and 2001 or some
>othere set of dates.
>
>I would realy like to be able to just have a function to tell me if a
>date in my datebase is
>befor or after a date?
SELECT *
FROM table
WHERE start_date BETWEEN
ELECT location,
CASE WHEN marketing = 'NEWS'
THEN numbrochures
ELSE NULL
END AS "NEWS",
CASE WHEN marketing = 'TV'
THEN numbrochures
ELSE NULL
END AS "TV",
...
but it's a
ented language that can't do this
sort of thing without some appalling contortions, if at all. (I can't
think of a way to do it.) So, store the data in PostgreSQL, but do
procedural processing in a more appropriate language.
--
Oliver Elphick[EMAIL PROTE
Boulat Khakimov wrote:
>Hi,
>
>How do I grant permissions on everything in the selected databes?
>
>GRANT doesnt take as on object database name nor does it accept wild
>chars
However you can give it a list of tables (and other objects).
>
>what to get -7678
This works in 7.1beta4. Perhaps you need to upgrade.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 102
Olaf Marc Zanger wrote:
>hi there,
>
>i want to add up the "true" values of a comparison like
>
>sum(a>b)
>
>it just doesn't work like this
>
>any workaround?
select count(*) where a > b;
--
Oliver Elphick
Ken Kline wrote:
>Hello,
> I would like my psql script to log everything that it does.
psql -e
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47
ve this problem?
Become user postgres before you try to run createuser. (Or become any
user who has create user privilege.)
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 7
Christopher Sawtell wrote:
>Is the "( 1 row)" string really supposed to be there?
>imho it should not be.
>How can I turn it off?
\pset tuples_only or \t or start psql with the -t option.
--
Oliver Elphick[EMAIL PROTE
Keith Gray wrote:
>Is DROP Column implemented in 7.x?
No
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: C
"Jaruwan Laongmal" wrote:
>Would you like to inform me how to modify type in table?
>For example , I define type as varchar(14) , but I want to modify to varcha=
>r(120). How to do this.
There is no facility to do this directly. (Allowing columns to change
their type would possibly involve
_ip FROM computers;
COALESCE() returns the leftmost non-null value from its parameters.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C
pport DESCRIBE... is there any other way to do this?
If you run psql with the -E option, it will show you the query it
uses when you type `\d+`. Use that query in your procedural code.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight
a (b) values ('Fred\'s text');
INSERT 6815937 1
junk=# select * from a;
a | b
---+-----
1 | some text
2 | John's text
3 | Fred's text
(3 rows)
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight htt
rmat you are using, but in standard SQL:
template1=# select CURRENT_DATE as now,
template1-#CAST (CURRENT_DATE + INTERVAL '7 days' AS DATE) as week;
now |week
+
2001-01-24 | 2001-01-31
(1 row)
Use to_char() for date formatting.
--
Oliver
Ramesh H R wrote:
>Hello everyone,
>Please can anyone tell me, where i can get Pgaccess query tool
It is in the PostgreSQL source at src/bin/pgaccess/
See also http://www.flex.ro/pgaccess
--
Oliver Elphick[EMAIL PROTECTED]
Isle of
select * from X.table
>
>This causes a parse error. What's the correct sintax?
It isn't possible to do this; you can only look at one database at a
time.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://w
QL queries echoed; then you can see where
the errors are arising.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C:
ent to look
up the newly-created row from the table:
bray=# insert into junk (name) values ('Fred');
INSERT 1780993 1
bray=# select * from junk where oid = 1780993 ;
id | name
+--
1 | Fred
(1 row)
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight
tal number of digits, and 2 is two decimal places).
template1=# select 3.68009074974387::numeric(3,2);
?column?
--
3.68
(1 row)
or use round(value,2)
template1=# select round(3.68009074974387, 2);
round
---
3.68
(1 row)
--
Oliver Elphick
ers. Not necessarily exactly sequential numbers.
For invoice numbers, it matters.
Numbers missing from such a sequence are likely to provoke questions from
auditors and taxmen; why borrow trouble?
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight
dural languages.
create function plpgsql_call_handler() returns opaque
as '/usr/local/pgsql/lib/plpgsql.so' <-- or wherever
language 'C';
create trusted procedural language 'plpgsql'
handler plpgsql_call_handler
lancompiler 'PL/pgSQL';
--
y could point on on where to search for it...
plperl failed to build in 7.0.2; however, I have just built 7.0.3-1 and plperl.so
is now included again. This should be uploaded within the next day or so.
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight
parser accepts it, but when it is run on a line that matches the ELSE in the
constraint, I get:
copy product from '/usr1/avoca/dumps/dbdump.product'
ERROR: copy: line 2, ExecEvalExpr: unknown expression type 108
Can this be made to work at all (in 7.0.2)?
--
Oliver Elphick
-- specify first to establish the
-- column types
union select id, null, null from foo
union select id, name, null from bar1
union select id, null, data from bar2;
Unfortunately, you can't make this a view, because views of unions are
not
t null, -- not null here
local_prova varchar(50) not null,
autorizado bool default 'f' not null,
id_plano_pgto int2 references plano_pgto not null,
data_matricula date default CURRENT_DATE not null,
primary key(id_aluno,id_curso,id_polo),
FOREIGN KEY (id_cu
complex WHERE clause).
Is there anything wrong with the syntax, or is it a missing feature?
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1
bmitted > created then resubmitted
else created
end
desc;
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56
u can drop the old table and recreate it with the correct
columns and import the data into it from new_table. (You could
just rename new_table if it doesn't need to be created with
constraints.)
--
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight
99 matches
Mail list logo