Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a2b498c2
Commit
a2b498c2
authored
May 28, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add info about selecting a random row.
parent
a6f01d1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
doc/FAQ
doc/FAQ
+9
-3
doc/src/FAQ/FAQ.html
doc/src/FAQ/FAQ.html
+11
-3
No files found.
doc/FAQ
View file @
a2b498c2
Frequently Asked Questions (FAQ) for PostgreSQL
Last updated:
Mon May 26 15:25:04
EDT 2003
Last updated:
Wed May 28 00:35:16
EDT 2003
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
...
...
@@ -58,7 +58,7 @@
Operational Questions
4.1) What is the difference between binary cursors and normal cursors?
4.2) How do I SELECT only the first few rows of a query?
4.2) How do I SELECT only the first few rows of a query?
A random row?
4.3) How do I get a list of tables or other things I can see in psql?
4.4) How do you remove a column from a table, or change it's data
type?
...
...
@@ -627,7 +627,7 @@
See the DECLARE manual page for a description.
4.2) How do I SELECT only the first few rows of a query?
4.2) How do I SELECT only the first few rows of a query?
A random row?
See the FETCH manual page, or use SELECT ... LIMIT....
...
...
@@ -637,6 +637,12 @@
evaluate only the first few records requested, or the entire query may
have to be evaluated until the desired rows have been generated.
To SELECT a random row, use:
SELECT col
FROM tab
ORDER BY random()
LIMIT 1;
4.3) How do I get a list of tables or other things I can see in psql?
You can read the source code for psql in file
...
...
doc/src/FAQ/FAQ.html
View file @
a2b498c2
...
...
@@ -10,7 +10,7 @@
alink=
"#0000ff"
>
<H1>
Frequently Asked Questions (FAQ) for PostgreSQL
</H1>
<P>
Last updated:
Mon May 26 15:25:04
EDT 2003
</P>
<P>
Last updated:
Wed May 28 00:35:16
EDT 2003
</P>
<P>
Current maintainer: Bruce Momjian (
<A
href=
"mailto:pgman@candle.pha.pa.us"
>
pgman@candle.pha.pa.us
</A>
)
<BR>
...
...
@@ -83,7 +83,7 @@
<A
href=
"#4.1"
>
4.1
</A>
) What is the difference between binary
cursors and normal cursors?
<BR>
<A
href=
"#4.2"
>
4.2
</A>
) How do I
<SMALL>
SELECT
</SMALL>
only the
first few rows of a query?
<BR>
first few rows of a query?
A random row?
<BR>
<A
href=
"#4.3"
>
4.3
</A>
) How do I get a list of tables or other
things I can see in
<I>
psql
</I>
?
<BR>
<A
href=
"#4.4"
>
4.4
</A>
) How do you remove a column from a
...
...
@@ -799,7 +799,7 @@
description.
</P>
<H4><A
name=
"4.2"
>
4.2
</A>
) How do I
<SMALL>
SELECT
</SMALL>
only the
first few rows of a query?
</H4>
first few rows of a query?
A random row?
</H4>
<P>
See the
<SMALL>
FETCH
</SMALL>
manual page, or use
<SMALL>
SELECT
</SMALL>
...
<SMALL>
LIMIT
</SMALL>
....
</P>
...
...
@@ -811,6 +811,14 @@
records requested, or the entire query may have to be evaluated
until the desired rows have been generated.
</P>
<P>
To
<SMALL>
SELECT
</SMALL>
a random row, use:
<PRE>
SELECT col
FROM tab
ORDER BY random()
LIMIT 1;
</PRE>
<H4><A
name=
"4.3"
>
4.3
</A>
) How do I get a list of tables or other
things I can see in
<I>
psql
</I>
?
</H4>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment