Re: [SQL] Best way to simulate Booleans

2009-07-06 Thread Scott Marlowe
On Mon, Jul 6, 2009 at 7:22 PM, Peter Headland wrote: > I know, I know, PostgreSQL has Booleans that work very nicely. > Unfortunately, I have to create a schema that will work on Oracle as well as > PostgreSQL, by which I mean that a single set of Java/JDBC code has to work > with both databases.

Re: [SQL] Sequences

2009-07-06 Thread Andre Rothe
Thanks, I have used SELECT sequence_name FROM information_schema.sequences WHERE sequence_catalog=? AND sequence_schema=? and then I can use select * from It seems to work :-) Andre Chris Browne wrote: Andre Rothe writes: Where are stored the sequence information? How I can query the pr

[SQL] Best way to simulate Booleans

2009-07-06 Thread Peter Headland
I know, I know, PostgreSQL has Booleans that work very nicely. Unfortunately, I have to create a schema that will work on Oracle as well as PostgreSQL, by which I mean that a single set of Java/JDBC code has to work with both databases. I have an XML meta-schema that enables me to generate appropri

[SQL] Sequences

2009-07-06 Thread Andre Rothe
Hi! Where are stored the sequence information? How I can query the properties of a sequence like increment, max/min value, cache? I'm looking for a table like user_sequences in Oracle, where I can query all of my sequences. Thanks Andre -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.o

Re: [SQL] fsync and Windows XP

2009-07-06 Thread Rainer Bauer
"Jon Norman" schrieb: >What is the trick for getting the fsync feature to work with Windows XP. > I've turned off disk caching and set fsync = on in my postgresql.conf, > but records are still not immediately written to disk. Check out the wal_sync_method parameter:

[SQL] Recording how a table is used

2009-07-06 Thread Daniel Gordon
I'm trying to record the results of a select statement into a separate table. I need the information selected, the column it was stored in, the table it was stored in, and the query that selected it. Everything I've read so far says that triggers can't trigger from select statements, and they don

Re: [SQL] Order of "WITH RECURSIVE" output

2009-07-06 Thread Andreas Joseph Krogh
On Tuesday 07 July 2009 03:55:35 am Tom Lane wrote: > Andreas Joseph Krogh writes: > > If I omit "ORDER BY", is the output *guaranteed* (according to some > > standard) to be ordered > > No. It's not necessary to read any other details to answer that ... > > regards, tom l

Re: [SQL] Order of "WITH RECURSIVE" output

2009-07-06 Thread Tom Lane
Andreas Joseph Krogh writes: > If I omit "ORDER BY", is the output *guaranteed* (according to some > standard) to be ordered No. It's not necessary to read any other details to answer that ... regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.o

[SQL] Order of "WITH RECURSIVE" output

2009-07-06 Thread Andreas Joseph Krogh
Hi all. Take this example from src/test/regress/sql/with.sql: WITH RECURSIVE subdepartment(level, id, parent_department, name) AS ( -- non recursive term SELECT 1, * FROM department WHERE name = 'A' UNION ALL -- recursive term SELECT sd.level + 1, d.* FROM