Re: Insert into and Sequence

From: Ireneusz Pluta <ipluta(at)wp(dot)pl>
To: Luigi Pirillo <luigi(dot)pirillo(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Insert into and Sequence
Date: 2007-12-19 13:21:29
Message-ID: 47691AD9.5070704@wp.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:4766CE38(dot)6060904(at)gmail(dot)com" type="cite"><tt><br>
Apparently, new records are not inserted in the table according to the
order selected by "Test_Step_Id" field;
<br>
</tt></blockquote>
<tt>As seen in: <a class="moz-txt-link-freetext" href="http://en.wikipedia.org/wiki/SQL:">http://en.wikipedia.org/wiki/SQL:</a><br>
"The order of rows returned by an SQL query is never guaranteed unless
an <code>ORDER BY</code> clause is specified".<br>
<br>
In other words, a database system does not guarantee you the order in
which table rows are stored. So, the order in which you insert your
rows is not the one which has to be followed when selecting them
afterwards. You must specify by "ORDER BY" how you want to sort your
recordset.<br>
<br>
It seems you need to revisit the concept of your system.<br>
<br>
Best regards<br>
<br>
Irek<br>
</tt><br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.1 KB

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Trout 2007-12-19 15:23:16 DBLink or setof record functions & type shortcuts
Previous Message Steve Midgley 2007-12-18 19:29:15 Re: System catalog future changes