On Fri, 16 Jan 2004, Denis wrote:
> create table contact (id int constraint contact_pk primary key, name
> text );
> create table address (id int constraint address_fk references contact(id) on
> delete cascade initially deferred,
>city text,
>pin t
On Fri, 16 Jan 2004 [EMAIL PROTECTED] wrote:
> Thanks for your reply.
>
> But, you will agree that result should be same JUST BEFORE and JUST AFTER
> commit ( assuming no one is working on the database and i am the only user
> connected.)
If you use the definition we're using now, then no, the a
On Wed, 21 Jan 2004, Rajesh Kumar Mallah wrote:
> can anyone explain why
> SELECT array_lower(array_prepend(0, ARRAY[1,2,3]), 1);
> returns 0 not 1
>
> because
>
> tradein_clients=# SELECT array_prepend(0, ARRAY[1,2,3]);
> +---+
> | array_prepend |
> +---+
> | {0,1,2,3}
On Thu, 29 Jan 2004, Bruno Wolff III wrote:
> On Thu, Jan 29, 2004 at 15:29:11 +0200,
> Achilleus Mantzios <[EMAIL PROTECTED]> wrote:
> > O kyrios Bruno Wolff III egrapse stis Jan 29, 2004 :
> >
> > As i see there was a thread
> > http://archives.postgresql.org/pgsql-hackers/2003-05/msg00762.ph
On Thu, 29 Jan 2004, Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > I'd thought that I'd previously sent a message containing a set of
> > definitions for the reverse opclasses (not meant for inclusion to the
> > system because I was ma
On Fri, 30 Jan 2004, Christoph Haller wrote:
> Just a short question (PostgreSQL 7.3.4 on hppa-hp-hpux10.20, compiled by GCC 2.8.1)
>
> SELECT ('' > 'GDMF') ; SELECT ('GDMF' > '');
> ?column?
> --
> f
> (1 row)
>
> ?column?
> --
> t
> (1 row)
>
> Are these results standard com
On Sat, 24 Jan 2004, Pragati Kenkare wrote:
> I am new to postgresql. Using PostgreSQL 7.3.2, I did the following.
>
> testdb#CREATE SEQUENCE principal_id increment 1 start 1000 cache 5;
>
> testdb#CREATE TABLE principal (principal_id int not null, name text, constraint
> pk_principal primary key
On Sat, 31 Jan 2004, beyaRecords - The home Urban music wrote:
> Hi,
> could someone please explain to me the mechanics of an UpDate:Cascade?
> Delete:Cascade I fully understand but not Update. I have 2 tables A and
> B. On B I have created a foreign key on user_id in both B and A for
> Update and
On Mon, 26 Jan 2004, Enio Schutt Junior wrote:
> In a database I am working, I sometimes have to delete all the records in
> some tables. According to the referential integrity defined in the creation
> of the tables, postmaster should not delete the records, but it does. I have
> used the follow
On Sat, 31 Jan 2004, Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > On Mon, 26 Jan 2004, Enio Schutt Junior wrote:
> >> In a database I am working, I sometimes have to delete all the records in
> >> some tables. According to the referential
On Wed, 11 Feb 2004, ow wrote:
> PostgreSQL 7.4 on i386-linux-gnu, compiled by GCC 2.96
>
> -- about 10 records
> CREATE TABLE my.Small
> (
> id my.dint NOT NULL,
> code my.dvalue NOT NULL,
> CONSTRAINT pk_1 PRIMARY KEY (id),
> ) WITHOUT OIDS;
>
> -- about 80M rows
> CREATE TABLE my.Large
>
On Thu, 12 Feb 2004, ow wrote:
>
> --- Stephan Szabo <[EMAIL PROTECTED]> wrote:
> > Hmm, I'd wonder if maybe it's choosing a sequential scan in the second
> > case? As a random question, does increasing the statistics target on
> > Large.small_id and r
On Thu, 12 Feb 2004, ow wrote:
> --- Stephan Szabo <[EMAIL PROTECTED]> wrote:
> > You also did the alter table to up the statistics target on the column,
> > right?
>
> Not really. I did not change the the default stats settings in the
> postgresql.conf. Not sure wha
On Thu, 12 Feb 2004, Tom Lane wrote:
> Rod Taylor <[EMAIL PROTECTED]> writes:
> > Statistics say there are 10 values. Statistics list the 10 most common
> > values (all of them). Given this, would it not be reasonable to assume
> > that 239 is a recent addition (if there at all) to the table and n
On Fri, 13 Feb 2004, Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > One thing is that IIRC we're going to ask for only one row when we do the
> > SPI_execp_current. However, unless I misremember, the behavior of for
> > update and limit means th
On Fri, 13 Feb 2004, Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > On Fri, 13 Feb 2004, Tom Lane wrote:
> >> I was looking at that last night. It seems like we could add a LIMIT at
> >> least in some contexts. In the case at hand, w
On Tue, 10 Feb 2004, Michael Sterling wrote:
> i'm trying to get the max time stamp, from each day, of a range of
> dates, not just the max time stamp for the complete range dates but
> for each day.
Maybe something like?
SELECT CAST(timestampcol AS DATE), max(timestampcol)
FROM thetable
GROUP
On Thu, 12 Feb 2004, Fredrik Wendt wrote:
> I read posts telling me that NULL values are considered greater than
> non-null values. Fine. Is there a way to explicitly reverse this?
Not directly, but I think ORDER BY assignedAt IS NOT NULL, assignedAt ASC
will give the ordering you want at the co
On Thu, 12 Feb 2004, Sumita Biswas (sbiswas) wrote:
> Hi All,
>
> This function of mine gives a Parse Error:
>
> CREATE or replace FUNCTION Proc_ConferenceSummary(date,date,int,int,int)
> RETURNS SETOF tbl_error_master AS
> '
> declare
> li_CallManagerId int;
> begin
> select * FROM tb
On Mon, 16 Feb 2004, Sumita Biswas (sbiswas) wrote:
> Thanks for the answer.
> I have one more issue. How do I test a function that I wrote?
> I was able to create a function called Proc_ConferenceSummary().
> In SQL Server I used to run it through query analyzer by writing the
> following command
[EMAIL PROTECTED]
On Tue, 17 Feb 2004, Karl Denninger wrote:
> I want to insert values from one table into another, and add some "default"
> values (that are not defaults on the table different reasons - that is, this
> is maintenance function and in normal operation there would be "real" values
On Wed, 18 Feb 2004, Sean Shanny wrote:
> To all,
>
> This is part of a data warehouse. Made the mistake of using a natural
> key in one of the fact tables. :-( The f_test_pageviews is a simple
> testing table while I work this out. The real table has an identical
> schema.
>
> I have built a
On Thu, 19 Feb 2004, Rodrigo Sakai wrote:
>Hi, I'm responsable for the database here in the company, and I like
>to know if is there a way to compile my pl/pgsql functions, its not a
>performance problem, it is more a security problem, i don like to
>have somebody looking into my c
On Thu, 19 Feb 2004, Edmund Bacon wrote:
>
> I have the following table:
>
> create table test (
> idserial primary key,
> product integer,
> tx_date date,
> quantity integer)
>
> with the following data:
> id | product | tx_date | quantity
> +-+---
On Fri, 27 Feb 2004, Kumar wrote:
> Dear Friends,
> I am using the record type as follows in my code.
>
> CREATE OR REPLACE FUNCTION fn_daily_calendar(date)
> RETURNS SETOF activities AS
> DECLARE
> p_cal_date ALIAS FOR $1;
> rec_activity act
On Thu, 26 Feb 2004, Kumar wrote:
> Get the following from the groups
> create or replace function ExpensiveDepartments() returns setof table1 as
Note that at least the example with this name in the SetReturningFunctions
guide seems to use setof int as the return type.
> '
> declare
> r tabl
On Fri, 27 Feb 2004, Brian Knox wrote:
> Is it possible within pl/pgsql, to convert an integer to an interval in
> months? IE, if num_months is an INT set to 48, can it be converted to an
> interval?
You should be able to say something like
num_months * INTERVAL '1 month'
I believe.
---
On Tue, 2 Mar 2004, Terence Kearns wrote:
> Tom Lane wrote:
> > Terence Kearns <[EMAIL PROTECTED]> writes:
> >
> >>I tried
> >>RETURNS SETOF RECORD
> >>but that doesn't work
> >
> >
> > Sure it does, if you use it correctly. Better show us what you did.
> >
> >regard
On Tue, 9 Mar 2004, Marty Scholes wrote:
> Hello,
>
> My company recently deployed Pg 7.4.1. on Solaris for an experimental
> project and is using the experience to evaluate its viability for
> migration from Oracle 7.0.
>
> While I like a lot of the features of Pg, one thing I noticed that
> "se
On Tue, 9 Mar 2004, Richard Grosse wrote:
> Trying to convert the query below to a view. The problem is
> despite it working as a query when trying to save it as a
> view the database returns the error that the field tablealias.cmpname
> is duplicated. (Which it is and has to be)
You're going to
On Wed, 10 Mar 2004, Andreas Joseph Krogh wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi, I'd like to fill one table with the contents of another table. Mye schema
> is like this:
>
> CREATE TABLE table1(
> id serial NOT NULL PRIMARY KEY,
> title varchar NOT NULL,
> description v
On Sat, 13 Mar 2004, Yasir Malik wrote:
> For my object-relational database class I decided to use PostgreSQL
> because it is my favorite database and it calls it self a ORDBMS. Little
> did I know that it supports supports very little OR features. For
> example, using "create type as" is totall
On Thu, 18 Mar 2004, Raman wrote:
> In my query of time zone i have details of interval with me like '-9:00',
> '+5:30' etc
>
> my problem is regarding the format of Date which i receive... ie. when I add
> the interval field the results are like:
> Query:
> select current_date at TIME ZONE "inter
On Mon, 22 Mar 2004, Erik Thiele wrote:
> On Mon, 22 Mar 2004 12:13:29 +0200 (EET)
> Achilleus Mantzios <[EMAIL PROTECTED]> wrote:
>
> > O kyrios Erik Thiele egrapse stis Mar 22, 2004 :
> >
> > Did you check out the DEFERRABLE option on the constraint?
> >
>
> DEFERRABLE
> NOT DEFERRABLE
>
> This
On Mon, 22 Mar 2004, Erik Thiele wrote:
> On Mon, 22 Mar 2004 06:21:28 -0800 (PST)
> Stephan Szabo <[EMAIL PROTECTED]> wrote:
>
> >
> > On Mon, 22 Mar 2004, Erik Thiele wrote:
> >
> > However, foreign keys are implemented using "constraint trigg
On Tue, 23 Mar 2004, Erik Thiele wrote:
> On Tue, 23 Mar 2004 10:17:31 -0600
> Bruno Wolff III <[EMAIL PROTECTED]> wrote:
>
> > On Tue, Mar 23, 2004 at 15:19:13 +0100,
> > Erik Thiele <[EMAIL PROTECTED]> wrote:
> > > now sadly i am getting this kind of problem:
> > >
> > >
> > > zeit=> insert in
On Mon, 5 Apr 2004, Bret Hughes wrote:
> select cities.name as city, buildings.name as building,
> pagename,
> log_date ,
> sum(exhibition_count) as tot
> from logrecords
> join cities on (logrecords.city=cities.num)
> join buildings on (logrecords.building=buildings.
On Tue, 6 Apr 2004, Robert Treat wrote:
> Trying to come up with the proper syntax to meet the following criteria:
>
> create table foo (bar integer, baz boolean UNIQUE (bar, baz = true));
>
> note the above syntax is not correct, but should demonstrate what i'm
> trying to do; I want to add a un
On Sat, 11 Apr 2004, Bret Hughes wrote:
> S*t s*t s*t. I have managed to screw up the system tables trying to
> delete a foreign key on a new table I was going to start using tomorrow.
>
>
> elevating-# \d diag_logs
> Table "diag_logs"
> Column |
On Fri, 23 Apr 2004, Antal Attila wrote:
> Hi!
>
> We have a complex problematic area. What is the simplest solution for
> the next query type:
>
> SELECT * FROM tablename ORDER BY col1 ASC, col2 DESC;
>
> In our experience, postgres cannot use a multi-colum index on (col1,
> col2) in this situa
On Fri, 14 May 2004, sad wrote:
> On Thursday 13 May 2004 19:27, you wrote:
> > sad wrote:
> > > select distinct a as F from table
> > > union
> > > select distinct b as F from table;
> >
> > Note that UNION only returns the unique values of the union
> > You can get repeated values by using UNION
On Mon, 10 May 2004, Jeff Kowalczyk wrote:
> I have two tables orders and customerpaymentnote, which keep denormalized
> columns of the status in rows related by orderid. The column duplication
> is intentional, to ease end-user ad-hoc queries. I don't understand the
> UPDATE FROM clause at:
> htt
On Wed, 12 May 2004, Theodore Petrosky wrote:
> I can not seem to update these rows because of the dot
> in the jobnumber field. I have found that I can change
> the dot to an underscore but I thought I would ask if
> there is a better solution.
>
> here is the error:
>
> UPDATE jobinfo SET isbil
On Mon, 17 May 2004, Stijn Vanroye wrote:
> Are you sure about that Edmund?
>
> I have the following query:
> select distinct on (task_id, date) task_id, workhour_id, date from
> (
> select task_id, workhour_id, begindate as date from workhour
> UNION
> select task_id, w
On Wed, 19 May 2004, Jie Liang wrote:
> According to the document of rule:
>
> CREATE RULE rulename AS ON delete TO mytablename DO
> (
> delete from aaa where id=OLD.id;
> Delete from bbb where id=OLD.id;
> Delete from ccc where id=OLD.id
> );
>
>
> Should work, but it doesn't, what wrong with it?
On Thu, 20 May 2004, Andreas wrote:
>
> Hi Andrei,
>
>
> >Use the Offset and Limit in the SQL query.
> >[...]
> >SELECT select_list
> >FROM table_expression
> >WHERE condition
> >LIMIT 50
> >OFFSET 1
> >
> >This query will return 50 elements starting with the 1 elements...
On Fri, 21 May 2004, Charlie Clark wrote:
> SELECT
> gender.value as anrede_value,
> person.name as person_name,
> person.vorname as person_vorname,
> person.zusatz as person_zusatz,
> person.birthdate as person_birthdate,
> address.strasse as address_strasse,
> address.hausnummer as address_hau
On Thu, 3 Jun 2004, Andrei Bintintan wrote:
> Hi to all,
>
> I have the following tables:
> CREATE TABLE t1(
> id serial PRIMARY KEY,
> active boolean NOT NULL DEFAULT 'y',
> num int4 NOT NULL,
> );
> CREATE UNIQUE INDEX t1_uniqueidx ON t1(num) WHERE active;
>
> CREATE TABLE t2(
> id serial PRIMAR
On Mon, 7 Jun 2004, sad wrote:
> It is clear that '' is a bad integer or timestamp representation
>
> but during the user input NULLs are usually represented with empty strings
> sometimes bunch of 'if empty' instructions grows huge
> (and in case of casting to timestamp apostrophes make sense)
On Tue, 8 Jun 2004, Michelle Murrain wrote:
> I'm trying to do something which seems really simple to me. (Postgres 7.3.4)
>
> I've got this table:
>
> charter_dev2=# \d rcourseinfo
> Table "public.rcourseinfo"
> Column| Type |
On Tue, 8 Jun 2004, kasper wrote:
> Im tryint to make a trigger that marks a tuble as changed whenever someone
> has updated it
>
> my table looks something like this
>
> create table myTable (
> ...
> changed boolean;
> )
>
> now ive been working on a trigger and a sp that looks like thi
On Mon, 14 Jun 2004, Jaime Casanova wrote:
> i have an strange result here, i'm using 7.4.2 on redhat 8
>
> i have a query like this
>
> SELECT CPA.rub_codigo, RUB.rub_descripcion, CPA.cpa_valor,
> CPA.cpa_fechavencimiento
> FROM rec_m_cuadropagos CPA, rec_m_rubro RUB
> WHERE RUB.ent_codigo = CPA
On Mon, 14 Jun 2004, Jaime Casanova wrote:
> On Mon, 14 Jun 2004, Jaime Casanova wrote:
>
> > i have an strange result here, i'm using 7.4.2 on redhat 8
> >
> > i have a query like this
> >
> > SELECT CPA.rub_codigo, RUB.rub_descripcion, CPA.cpa_valor,
> > CPA.cpa_fechavencimiento
> > FROM
On Mon, 14 Jun 2004, Tom Lane wrote:
> "Jaime Casanova" <[EMAIL PROTECTED]> writes:
> > AND
> > CPA.cur_paralelo = ALL (SELECT cur_paralelo FROM aca_t_curso ...)
>
> Wait a second ... we are all overthinking the problem. The subselect
> returns three *different* values. It is not possible for a
On Wed, 16 Jun 2004, ctrl wrote:
> CREATE OR REPLACE FUNCTION getNextWebsiteForCrawl(integer) RETURNS
> website AS '
> DECLARE
> my_record RECORD;
> w website%rowtype;
> count smallint;
You can't safely use a variable named count and the count(*) expression
below I think, so you'll want to rename
On Tue, 22 Jun 2004, Gary Stainburn wrote:
> On Monday 21 Jun 2004 4:11 pm, Gary Stainburn wrote:
> > On Monday 21 Jun 2004 3:19 pm, Tom Lane wrote:
> > > Gary Stainburn <[EMAIL PROTECTED]> writes:
> > > > from requests r, users u, request_types t,
> > > > request_states s, dealersh
On Thu, 24 Jun 2004, sad wrote:
> > I don't see what your point is. That SQL is wrong ? Or that SQL is not "C"
> > ? Or that SQL is not a "programming language" ?
>
> Who said wrong ? who said SQL ?
>
> I thougth _WHY_
> the IF control structure has exactly two alternate blocks ?
> a BOOLEAN expre
On Thu, 24 Jun 2004, sad wrote:
> > If you were to add a NULL block you'd have to deal with things
> > like, if you only have a then and else, do you run the else on NULL or do
> > you do nothing? If you do nothing, what if you want the null and else to
> > be the same, do you add another way to
On Thu, 24 Jun 2004, sad wrote:
> > then lots of currently perfectly correct
> > programs break. If they're the same, then ELSE has different meanings
> > depending on whether NULL is specified, and that's generally bad from an
> > understanding the language standpoint.
>
> i've already thougth
On Thu, 24 Jun 2004, Bruno Wolff III wrote:
> On Thu, Jun 24, 2004 at 07:34:18 -0700,
> Stephan Szabo <[EMAIL PROTECTED]> wrote:
> >
> > I was thinking that something like Cs switch might work. There's still a
> > question of the keywords because I
On Tue, 29 Jun 2004, Stefan Weiss wrote:
> On Tuesday, 29 June 2004 00:17, Dmitri Bichko wrote:
> > As far as TRUE and FALSE go, from what I know you can use = to compare
> > them with boolean columns, unless I misunderstood your question.
>
> Sorry, I must have remembered that incorrectly, or ma
On Tue, 29 Jun 2004, Greg Stark wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
>
> > IS TRUE and IS FALSE have a different effect from =true and =false when
> > the left hand side is NULL. The former will return false, the latter will
> > return NULL.
>
>
On Wed, 23 Jun 2004, Zoltan Boszormenyi wrote:
> I don't know how PostgreSQL works internally but this bug *must* be
> conforming to some standard if two distinct SQL server products behave
> (almost) the same. I said almost, I discovered the same annoyance today
> on an Informix 9.21 running und
On Thu, 1 Jul 2004, Kenneth Gonsalves wrote:
> On Tuesday 29 June 2004 07:19 pm, Phil Endecott wrote:
> > Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> > > in my app i have a table where the id serves as a foreign key for
> > > one or more other tables. if i want to delete a row in the table,
> >
On Sun, 4 Jul 2004, Kris Jurka wrote:
> On Sat, 3 Jul 2004, Dario V. Fassi wrote:
>
> > In the sample adjunct, you can see that error arise at the time when the
> > view's sql text is parsed and saved in database catalog.
> > Then generic NUMERIC type is forced for every calculated column without
On Sun, 4 Jul 2004, Dario V. Fassi wrote:
>
>
> Stephan Szabo wrote:
>
> >On Sun, 4 Jul 2004, Kris Jurka wrote:
> >
> >
> >
> >>On Sat, 3 Jul 2004, Dario V. Fassi wrote:
> >>
> >>
> >>
> >>>In the sample adjunct,
On Sun, 4 Jul 2004, Dario V. Fassi wrote:
> Stephan, look at the samples I send in previous posts , from PgSql and Db2.
I don't see any samples apart from the original view descriptions and the
getColumns results. I see some implication about db2 but no details. My
guess is that the messages a
On Sun, 11 Jul 2004, Theodore Petrosky wrote:
> I give up.. what don't I understand about casting and
> ints and text..
>
> i have a table jobinfo with:
>
> acode text,
> jobnumber text default
> nextval('public.jobinfo_seq'::text),
> jobtitle text
>
> I have about 3000 rows starting with jobnumb
On Mon, 12 Jul 2004, Ruggero wrote:
> Hi all,
> I have a problem sorting varchar fields.
> I will explain the problem with a simple example:
>
> this query
>select '##10' as sortfield
>union
>select '###1' as sortfield
>order by sortfield
> produces this correct output:
>'###1'
On Wed, 21 Jul 2004, Markus Bertheau wrote:
> shouldn't it be illegal for an immutable function to call a stable one?
It's expected that the function's creator is responsible for properly
marking its stability. This allows some flexibility when you know more
than the system does (for example, a
On Thu, 22 Jul 2004 [EMAIL PROTECTED] wrote:
> > > Alternatively, you can do:
> > > INSERT (accepting the default)
> > > then SELECT currval(the_sequence_object);
> > > then
> > >
> > > NOTE: 2nd method assumes that nobody else called nextval() on the
> > > sequence between when you did the
> >
On Thu, 22 Jul 2004, Gerardo Castillo wrote:
> Hello,
>
> I'm using PostgreSQL 7.4
>
> I have a function wich use temporary tables. I read about temporary tables
> and they exists during the session.
> But i have to call this function many times in the same sesion with
> diferents parameters and e
On Mon, 2 Aug 2004, Jeff Boes wrote:
> Hmm, this is puzzling me:
>
> create or replace function fn_foo(text) returns trigger as '
> begin
># Do some stuff with $1
> end;
> ' language 'plpgsql';
>
> CREATE FUNCTION
>
> create table bar (aaa text);
>
> CREATE TABLE
>
> create trigger trg_bar
> a
On Thu, 5 Aug 2004, Ram Nathaniel wrote:
>
> 1) The operator "of max":
> suppose I have a table "grades" of 3 fields: class/student/grade where I
> store many grades of many students of many classes. I want to get the
> name of the highest scoring student in each class. Note that there may
> be m
On Thu, 12 Aug 2004, Philippe Lang wrote:
> > > The problem now is that get_lines is being called twice per line.
> >
> > Is get_lines() defined as IMMUTABLE? Should it be?
>
> I have tried defining get_lines as "IMMUTABLE", or "WITH (iscachable)",
> but it keeps on getting called twice per line
On Wed, 11 Aug 2004, Traci Sumpter wrote:
> A team developer has chosen the lazy way of not checking if a variable
> exists on his PHP page and has code which produces the following SQL
>
> SELECT * FROM mytable where myfield ilike '%%'
>
> I have noticed that this statement does not return null o
On Tue, 17 Aug 2004, Richard Huxton wrote:
> Markus Bertheau wrote:
> > Hi,
> >
> > PostgreSQL doesn't allow the creation of a foreign key to a combination
> > of fields that has got no dedicated unique key but is unique nonetheless
> > because a subset of the combination of fields has a unique c
On Tue, 17 Aug 2004, Markus Bertheau wrote:
> Ð ÐÑÑ, 17.08.2004, Ð 16:46, Tom Lane ÐÐÑÐÑ:
>
> > I think one reason for this is that otherwise it's not clear which
> > unique constraint the FK constraint depends on. Consider
> >
> > create table a (f1 int unique, f2 int unique);
> >
> > cr
On Tue, 17 Aug 2004, Markus Bertheau wrote:
> В Втр, 17.08.2004, в 16:12, Bruno Wolff III пишет:
> > > SELECT MAX(position) FROM (SELECT position FROM classes WHERE name =
> > > 'foo' FOR UPDATE OF classes) AS foo
> > >
> > > It's clear which rows should be locked here, I think.
> >
> > Even if it
On Tue, 17 Aug 2004, Markus Bertheau wrote:
> В Втр, 17.08.2004, в 17:06, Stephan Szabo пишет:
> > On Tue, 17 Aug 2004, Markus Bertheau wrote:
> >
> > > В Втр, 17.08.2004, в 16:46, Tom Lane пишет:
> > >
> > > > I think one reason for this is that
On Tue, 17 Aug 2004, Josh Berkus wrote:
> I have a wierd business case. Annoyingly it has to be written in *portable*
> SQL92, which means no arrays or custom aggregates. I think it may be
> impossible to do in SQL which is why I thought I'd give the people on this
> list a crack at it. Solve
On Wed, 18 Aug 2004, Jan Wieck wrote:
> On 8/18/2004 9:49 AM, Markus Bertheau wrote:
>
> > В Срд, 18.08.2004, в 15:33, Jan Wieck пишет:
> >
> >> Meaning that not enforcing the uniqueness of those columns isn't an
> >> option.
> >
> > The thing is that the columns _are_ unique, there's just no uniq
On Wed, 18 Aug 2004, Josh Berkus wrote:
> > In the case that a table constraint is a referential constraint,
> > the table is referred to as the referencing table. The referenced
> > columns of a referential constraint shall be the unique columns of
> > some unique constraint
On Fri, 20 Aug 2004, Richard Huxton wrote:
> It'd be nice to say something like:
>
> ALTER TABLE status ADD CONSTRAINT user_status_fk
> FOREIGN KEY (status) WHERE relation = 'users'
> REFERENCES users(status);
>
> And the flip-side so you can have:
>
> ALTER TABLE cheque_details ADD CONSTRAINT chq
On Wed, 25 Aug 2004, Iain wrote:
>
> # select 9223372036854775807 = 9223372036854775807::float;
> ?column?
> --
> t
> (1 row)
> This and the fact that it's still possible to find the row using the
> original value would seem to indicate that the rounding is just a display
> artifact..
On Wed, 1 Sep 2004, sad wrote:
> On Tuesday 31 August 2004 17:49, Michael Glaesemann wrote:
> > On Aug 31, 2004, at 8:24 PM, sad wrote:
> > > and i am still desire to know _WHY_ there are no predefined cast for
> > > BOOL ?
> > > and at the same time there are predefined casts for INT and FLOAT...
On Wed, 1 Sep 2004, sad wrote:
> On Wednesday 01 September 2004 09:24, Stephan Szabo wrote:
> > On Wed, 1 Sep 2004, sad wrote:
> > > On Tuesday 31 August 2004 17:49, Michael Glaesemann wrote:
> > > > On Aug 31, 2004, at 8:24 PM, sad wrote:
> > > > >
On Wed, 1 Sep 2004, sad wrote:
> > There's a difference between an output function and a cast to text.
> > One gives you an external representation of the data for end use. The
> > other gives you an internal representation for manipulation.
>
> And at the same time
>
> 't'::TEXT can be casted t
On Wed, 1 Sep 2004, Tom Lane wrote:
> Peter Eisentraut <[EMAIL PROTECTED]> writes:
> > The cast to text, however, is part of the data model, and it has to be
> > both natural and universal. I think you agree that there is no
> > universal, obvious correspondence between character strings and boo
On Mon, 6 Sep 2004, Troels Arvin wrote:
> The query returns double the numer of rows, compared to what I wanted. The
> problem seems to stem from PostgreSQL's naming of constraints without
> explicit name: They seem to be named $1, $2, etc, and the default names
> are reused.
[...]
> Note, again,
On Tue, 14 Sep 2004, Robert Davis wrote:
> I'm trying to benchmark some complex sql queries. One query, in
> particular, is causing problems -- its cost values can vary from 228
> to 907, its Total Runtimes from 60 ms to 5176 ms. The query plans
> show that the optimizer is choosing different pl
On Mon, 20 Sep 2004, CHRIS HOOVER wrote:
> I need some help writing a simple function.
>
> Due to some program limitations for a program I run the db's for, I'm having
> to write some simple functions to run some selects. However, I am not sure
> how to have them correctly return the record(s) se
On Tue, 21 Sep 2004, Alain Reymond wrote:
> I created a database with Postgres 7.3.4 under Linux RedHat 7.3 on a
> Dell PowerEdge server.
You should probably upgrade to the end of the 7.3 branch at the least
(7.3.7).
> One of the table is
> resultats(numbil, numpara, mesure, deviation)
> with a
On Tue, 21 Sep 2004, CHRIS HOOVER wrote:
> Thanks a bunch for the pointers and help.
>
> One other hopefully quick question.
>
> How do you query using a variable containing the query?
>
> I'm trying to build a select statment based upon what parameters are being
> passed to the function.
>
> somt
On Mon, 18 Oct 2004, Kent Anderson wrote:
> I am pulling a report from the database using a stored procedure but cannot
> get the information to return in a specific order unless I hardcode the
> order by clause.
>
> CREATE OR REPLACE FUNCTION submissionreport(INTEGER, DATE, TEXT) RETURNS
> setof
On Wed, 20 Oct 2004, Markus Bertheau wrote:
> http://www.postgresql.org/docs/current/static/sql-createtable.html says,
> down at the explanation of DEFERRABLE, that constraints are checked
> after every command. Why does the following not work then:
>
> CREATE TABLE foo (
> pos INT UNIQUE
> );
On Thu, 21 Oct 2004, Kent Anderson wrote:
> I have a few tables that have duplicated values from an import from a
> different database. I have two keys I tried to set as primary and got an
> error
> ERROR: could not create unique index
> DETAIL: Table contains duplicated values.
>
> Is there som
On Tue, 26 Oct 2004, Wei Weng wrote:
> In the following query
>
> SELECT Parent FROM Channels ORDER BY Parent ASC;
>
> If I have a couple of (NULL)s in the field [Parent], they will be listed at
> the bottom of the query result.
>
> Is it because PostgreSQL considers (NULL) as the biggest value? I
On Wed, 27 Oct 2004, Dmitry P. Ovechkin wrote:
> Hello.
> I'mtrying to implement history tables using rules.
> I have
> test_table
> --
> create sequence history_seq start 1;
> create sequence test_sequence;
> # source table
> drop table test_table;
> create table test_table (
> i integer
On Wed, 27 Oct 2004, Jon Uhal wrote:
> I'm having trouble trying to get my databases setup so that when I
> delete a row from the base table, all related information is removed as
> well. I've been testing this with PostgreSQL version (postmaster
> (PostgreSQL) 8.0.0beta1) on a Windows 2000 Pro m
501 - 600 of 732 matches
Mail list logo